@instaffogmbh/read-file-if-exists
v1.0.1
Published
Try to read a file. Ignore ENOENT.
Downloads
2
Readme
@instaffogmbh/read-file-if-exists
Try to read a file. Ignore ENOENT.
- 📣 💼 💰 Looking for a tech job? Try our reverse recruiting service.
API
This module exports one function:
readFileIfExists(path[, options])
Arguments are expected as described for Node's fs.readFile.
Returns a promise that…
- resolves to the file's contents if it the read attempt succeeded.
- resolves to
false
if errorENOENT
(file not found) was encountered. - rejects for all other errors.
License
MIT