Skip to content
1 min read · 291 words

Interface: DevFileAccess ​

Defined in: src/batteries/dev_tools/types.ts:167

Narrow filesystem façade granted to in-place capabilities.

Properties ​

PropertyModifierTypeDescriptionDefined in
scopereadonlyreadonly string[]Concrete allowlist enforced for this invocation, after selector narrowing and dirty-path withholding.src/batteries/dev_tools/types.ts:181

Methods ​

delete() ​

ts
delete(path: string): Promise<void>;

Defined in: src/batteries/dev_tools/types.ts:173

Deletes an authorized file; availability is controlled by the declared needs set.

Parameters ​

ParameterType
pathstring

Returns ​

Promise<void>


exists() ​

ts
exists(path: string): Promise<boolean>;

Defined in: src/batteries/dev_tools/types.ts:179

Probes whether an authorized create target exists; stat failures return false.

Parameters ​

ParameterType
pathstring

Returns ​

Promise<boolean>


mkdir() ​

ts
mkdir(path: string): Promise<void>;

Defined in: src/batteries/dev_tools/types.ts:177

Creates an authorized directory and parents when mkdir was declared.

Parameters ​

ParameterType
pathstring

Returns ​

Promise<void>


read() ​

ts
read(path: string): Promise<string>;

Defined in: src/batteries/dev_tools/types.ts:169

Reads an authorized workspace-relative file through the façade.

Parameters ​

ParameterType
pathstring

Returns ​

Promise<string>


rename() ​

ts
rename(from: string, to: string): Promise<void>;

Defined in: src/batteries/dev_tools/types.ts:175

Moves an authorized source to an absent, authorized destination.

Parameters ​

ParameterType
fromstring
tostring

Returns ​

Promise<void>


write() ​

ts
write(path: string, text: string): Promise<void>;

Defined in: src/batteries/dev_tools/types.ts:171

Writes an existing authorized file or creates an absent, glob-authorized file.

Parameters ​

ParameterType
pathstring
textstring

Returns ​

Promise<void>