You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
File I/O is provided by simple wrappers around standard POSIX functions. To use this module do require('fs'). All the methods have asynchronous and synchronous forms.
The asynchronous form always take a completion callback as its last argument. The arguments passed to the completion callback depend on the method, but the first argument is always reserved for an exception. If the operation was completed successfully, then the first argument will be null or undefined.
fs.exists() is an anomaly and something of a wart; it started out as path.exists() but was later moved to the fs module because the path module didn't do any I/O (except for path.exists(), of course), that's why it doesn't match the other fs functions.
I've added a note to the documentation in d97ea06 that hopefully stops people from using it.
On the docs it says:
But
fs.exists
doesn't really match that description at all.The text was updated successfully, but these errors were encountered: