massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / graceful-fs / README.md
index 5273a50ad6a52c665903443c81aaec5ad4e0dbc3..82d6e4daf0cdb8543cca8ce644e6b6dfa61b86f8 100644 (file)
@@ -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