1.0.1 • Published 6 years ago

@instaffogmbh/read-file-if-exists v1.0.1

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
6 years ago

@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

1.0.1

6 years ago

1.0.0

7 years ago