-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add note about fs.rmdir()/fs.rmdirSync() #14323
Conversation
doc/api/fs.md
Outdated
@@ -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 the file (not directory) results in an `ENOENT` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I am not sure, but maybe "on a file"?
doc/api/fs.md
Outdated
@@ -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 directory) results in an `ENOENT` | |||
error on Windows and `ENOTDIR` error on Linux/macOS. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, also it is a good idea to generalize ENOTDIR
for UNIX systems, not just Linux.
doc/api/fs.md
Outdated
@@ -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 directory) results in an `ENOENT` | |||
error on Windows and `ENOTDIR` error on UNIX/macOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I know you already changed it from Linux
to UNIX
, but I believe that throughout or docs, we use POSIX
(and that includes macOS, or at least it does in our docs).
/cc @nodejs/documentation in case I'm wrong about some aspect of this. :-D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in Sync version as well, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small nit and then LGTM
doc/api/fs.md
Outdated
@@ -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 directory) results in an `ENOENT` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit not directory => not a directory
doc/api/fs.md
Outdated
@@ -2018,6 +2021,9 @@ changes: | |||
|
|||
Synchronous rmdir(2). Returns `undefined`. | |||
|
|||
*Note*: Using `fs.rmdirSync()` on a file (not directory) results in an `ENOENT` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit not directory => not a directory
doc/api/fs.md
Outdated
@@ -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 `ENOTDIR` error on POSIX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENOTDIR error
-> an ENOTDIR error
(same below)
fs.rmdir() on the file (not directory) results in different errors on Windows to everything else fixes: nodejs#8797
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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>
Landed in bd7735e |
Congrats on becoming a Contributor @al-k21 ! |
Nice work @al-k21 |
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>
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>
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>
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>
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>
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>
fs.rmdir()/fs.rmdirSync() on the file (not directory) results in different errors on
Windows to everything else
fixes: #8797
Checklist
Affected core subsystem(s)
doc