Windows 上的每个驱动器工作目录
【Per-drive working directories on Windows】
在 Windows 上,Node.js 遵循每个驱动器的工作目录概念。当使用不带反斜杠的驱动器路径时,可以观察到这种行为。例如,fs.readdirSync('C:\') 的返回结果可能与 fs.readdirSync('C:') 不同。更多信息,请参见 这个 MSDN 页面。
【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.】