From 422722ff67fc29e1cfd212d183a9594f8869de7f Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 6 Jun 2017 11:19:23 +0200 Subject: [PATCH] win, doc: document per-drive current working dir Add note to fs.md and path.md about Windows using per-drive current working directory. Fixes: https://github.com/nodejs/node/issues/9378 PR-URL: https://github.com/nodejs/node/pull/13330 Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell Reviewed-By: Refael Ackermann --- doc/api/fs.md | 7 +++++++ doc/api/path.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/doc/api/fs.md b/doc/api/fs.md index 8ae521a0d2dd1a..5361f06f209904 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -94,6 +94,12 @@ Error: EISDIR: illegal operation on a directory, read ``` +*Note:* On Windows Node.js follows the concept of per-drive working directory. +This behavior can be observed when using a drive path without a backslash. For +example `fs.readdirSync('c:\\')` can potentially return a different result than +`fs.readdirSync('c:')`. For more information, see +[this MSDN page][MSDN-Rel-Path]. + ## WHATWG URL object support