--allow-fs-vfs
稳定性: 1.1 - 处于活跃开发中
在使用 权限模型 时,默认情况下无法挂载 虚拟文件系统:除非用户在启动 Node.js 时明确传递 --allow-fs-vfs 标志,否则 vfs.mount() 会抛出 ERR_INVALID_STATE。
🌐 When using the Permission Model, a virtual file system cannot be
mounted by default: vfs.mount() throws ERR_INVALID_STATE unless the
user explicitly passes the --allow-fs-vfs flag when starting Node.js.
已挂载的 VFS 提供的路径是文件系统权限无法描述的,所以挂载它依赖于它自己的标志,而不是 --allow-fs-read 或 --allow-fs-write。
🌐 A mounted VFS serves paths that the file system permissions do not describe,
so mounting one is gated on its own flag rather than on --allow-fs-read or
--allow-fs-write.
$ node --experimental-vfs --permission --allow-fs-vfs app.js