From bd7735e8f7819902f8ba78f2deab24dba3854313 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 46b61f00127e0a..6c8cbf42dc8d4e 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -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 an `ENOTDIR` error on POSIX. + ## fs.rmdirSync(path)