How do i check the existence of a file?

In the documentation for the module fs there’s a description of the method fs.exists(path, callback). But, as I understand, it checks for the existence of only directories. And I need to check the file!

How can this be done?

20 Answers
20

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *