diff --git a/doc/api/cli.md b/doc/api/cli.md index 09c9b5309ffa..0b379b4bd63f 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -268,6 +268,26 @@ process.permission.has('fs.read', 'custom-require.js'); // true process.permission.has('fs.read', 'custom-require-2.js'); // true ``` +### `--allow-fs-vfs` + + + +> Stability: 1.1 - Active development + +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. + +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`. + +```console +$ node --experimental-vfs --permission --allow-fs-vfs app.js +``` + ### `--allow-fs-write`