Browse Source

docs: add note about fs.rmdir()

fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: https://github.com/nodejs/node/issues/8797
PR-URL: https://github.com/nodejs/node/pull/14323
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
v6
Oleksandr Kushchak 8 years ago
committed by James M Snell
parent
commit
bd7735e8f7
  1. 6
      doc/api/fs.md

6
doc/api/fs.md

@ -2004,6 +2004,9 @@ changes:
Asynchronous rmdir(2). No arguments other than a possible exception are given
to the completion callback.
*Note*: Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT`
error on Windows and an `ENOTDIR` error on POSIX.
## fs.rmdirSync(path)
<!-- YAML
added: v0.1.21
@ -2018,6 +2021,9 @@ changes:
Synchronous rmdir(2). Returns `undefined`.
*Note*: Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT`
error on Windows and an `ENOTDIR` error on POSIX.
## fs.stat(path, callback)
<!-- YAML
added: v0.0.2

Loading…
Cancel
Save