From f6a03439d8d0facbe19b620ef55f2f15e51e20b9 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 7686563343bae2..e151f0fed89a15 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)