Skip to content

Commit

Permalink
docs: add note about fs.rmdir()
Browse files Browse the repository at this point in the history
fs.rmdir() on the file (not directory) results in different errors on
Windows to everything else

Fixes: #8797
PR-URL: #14323
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
  • Loading branch information
Oleksandr-Kushchak-i2 authored and MylesBorins committed Sep 5, 2017
1 parent 226ef71 commit 1d5ba9c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1d5ba9c

Please sign in to comment.