From ac245d1930e8c6562b582227283d4db90f309a34 Mon Sep 17 00:00:00 2001 From: Oleksandr Kushchak Date: Mon, 17 Jul 2017 10:11:09 +0100 Subject: [PATCH] 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 Reviewed-By: Gireesh Punathil Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Jeremiah Senkpiel Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock --- doc/api/fs.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 3b7cdf33d77fd5..381bf422006b44 100644 --- a/doc/api/fs.md +++ b/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)