---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/dev-tools/interfaces/DevFileAccess.md
description: Narrow filesystem façade granted to in-place capabilities.
---

# Interface: DevFileAccess

Defined in: [src/batteries/dev\_tools/types.ts:167](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L167)

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

## Properties

| Property                            | Modifier   | Type                | Description                                                                                           | Defined in                                                                                                                 |
| ----------------------------------- | ---------- | ------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|  `scope` | `readonly` | readonly `string`\[] | Concrete allowlist enforced for this invocation, after selector narrowing and dirty-path withholding. | [src/batteries/dev\_tools/types.ts:181](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L181) |

## Methods

### delete()

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

Defined in: [src/batteries/dev\_tools/types.ts:173](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L173)

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

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `path`    | `string` |

#### Returns

`Promise`<`void`>

***

### exists()

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

Defined in: [src/batteries/dev\_tools/types.ts:179](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L179)

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

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `path`    | `string` |

#### Returns

`Promise`<`boolean`>

***

### mkdir()

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

Defined in: [src/batteries/dev\_tools/types.ts:177](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L177)

Creates an authorized directory and parents when `mkdir` was declared.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `path`    | `string` |

#### Returns

`Promise`<`void`>

***

### read()

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

Defined in: [src/batteries/dev\_tools/types.ts:169](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L169)

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

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `path`    | `string` |

#### Returns

`Promise`<`string`>

***

### rename()

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

Defined in: [src/batteries/dev\_tools/types.ts:175](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L175)

Moves an authorized source to an absent, authorized destination.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `from`    | `string` |
| `to`      | `string` |

#### Returns

`Promise`<`void`>

***

### write()

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

Defined in: [src/batteries/dev\_tools/types.ts:171](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/dev_tools/types.ts#L171)

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

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `path`    | `string` |
| `text`    | `string` |

#### Returns

`Promise`<`void`>
