@instaffogmbh/read-file-if-exists

1.0.1 • Public • Published

@instaffogmbh/read-file-if-exists

Try to read a file. Ignore ENOENT.

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 error ENOENT (file not found) was encountered.
  • rejects for all other errors.

 

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @instaffogmbh/read-file-if-exists

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

4.42 kB

Total Files

8

Last publish

Collaborators

  • bhanu.pv
  • instaffo