Skip to content

Function: createFsAllowOnlyGuardBuilder() ​

ts
function createFsAllowOnlyGuardBuilder(globs): FsAllowOnlyGuardNode;

Defined in: fs/src/builders/create-fs-allow-only-guard-builder.ts:13

Compiles a passive FsAllowOnlyGuardNode (fs:allow-only) for fs.allowOnly(globs).

Restricts filesystem write mutations strictly to paths matching at least one glob in globs (or an active LeaseDelta grant).

Parameters ​

ParameterTypeDescription
globsreadonly string[]Allowed write glob patterns.

Returns ​

FsAllowOnlyGuardNode

Deeply frozen FsAllowOnlyGuardNode AST descriptor.

Released under the MIT License.