Skip to content

Commit

Permalink
Clarify README.md regarding sync methods (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyfarrell committed Mar 5, 2021
1 parent 24f88fd commit 89dc133
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Expand Up @@ -30,9 +30,19 @@ the directory.
var fs = require('graceful-fs')

// now go and do stuff with it...
fs.readFileSync('some-file-or-whatever')
fs.readFile('some-file-or-whatever', (err, data) => {
// Do stuff here.
})
```

## Sync methods

This module cannot intercept or handle `EMFILE` or `ENFILE` errors from sync
methods. If you use sync methods which open file descriptors then you are
responsible for dealing with any errors.

This is a known limitation, not a bug.

## Global Patching

If you want to patch the global fs module (or any other fs-like
Expand Down

0 comments on commit 89dc133

Please sign in to comment.