Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6a0343

Browse filesBrowse files
Oleksandr-Kushchak-i2Fishrock123
authored andcommitted
docs: add note about fs.rmdir()
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 <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>
1 parent 3bc7d2a commit f6a0343
Copy full SHA for f6a0343

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Open diff view settings
Collapse file

‎doc/api/fs.md‎

Copy file name to clipboardExpand all lines: doc/api/fs.md
+6Lines changed: 6 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,9 @@ changes:
20042004
Asynchronous rmdir(2). No arguments other than a possible exception are given
20052005
to the completion callback.
20062006

2007+
*Note*: Using `fs.rmdir()` on a file (not a directory) results in an `ENOENT`
2008+
error on Windows and an `ENOTDIR` error on POSIX.
2009+
20072010
## fs.rmdirSync(path)
20082011
<!-- YAML
20092012
added: v0.1.21
@@ -2018,6 +2021,9 @@ changes:
20182021

20192022
Synchronous rmdir(2). Returns `undefined`.
20202023

2024+
*Note*: Using `fs.rmdirSync()` on a file (not a directory) results in an `ENOENT`
2025+
error on Windows and an `ENOTDIR` error on POSIX.
2026+
20212027
## fs.stat(path, callback)
20222028
<!-- YAML
20232029
added: v0.0.2

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.