fsPromises.open(path, flags[, mode])
path<string> | <Buffer> | <URL>flags<string> | <number> 参见 文件系统flags支持。 默认值:'r'。mode<string> | <integer> 如果文件被创建,设置文件模式(权限和粘滞位)。默认值:0o666(可读可写)- 返回:<Promise> 以 <FileHandle> 对象完成。
打开一个 <FileHandle>。
【Opens a <FileHandle>.】
有关更多详细信息,请参阅 POSIX open(2) 文档。
【Refer to the POSIX open(2) documentation for more detail.】
在 Windows 系统下,一些字符(< > : " / \ | ? *)是保留的,如 命名文件、路径和命名空间 所述。在 NTFS 中,如果文件名包含冒号,Node.js 将会打开文件系统流,如 这个 MSDN 页面 所述。
【Some characters (< > : " / \ | ? *) are reserved under Windows as documented
by Naming Files, Paths, and Namespaces. Under NTFS, if the filename contains
a colon, Node.js will open a file system stream, as described by
this MSDN page.】