thlorenz / find-parent-dir

Finds the first parent directory that contains a given file or directory.
MIT License
24 stars 8 forks source link

fs.exists() and fs.existsSync() will be deprecated #4

Open Zirro opened 9 years ago

Zirro commented 9 years ago

According to the Node.js API docs fs.exists() and fs.existsSync() will be deprecated. They are currently critical to the operation of this module. An alternative method is suggested in this thread on Stack Overflow.

thlorenz commented 9 years ago

PRs that work in older versions of node and in newer ones appreciated.

i.e. test should pass in node 0.10, 0.12 and new iojs versions (in which case you can use fs.access.

LinusU commented 8 years ago

The following ponyfill could be used: https://www.npmjs.com/package/fs-access