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.