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.x
Oleksandr Kushchak 8 years ago
committed by Myles Borins
parent
commit
1d5ba9c8e9
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 6
      doc/api/fs.md

6
doc/api/fs.md

@ -1546,6 +1546,9 @@ added: v0.0.2
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
@ -1555,6 +1558,9 @@ added: v0.1.21
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