---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/sandbox/interfaces/ConformanceMutations.md
description: Optional mutation fixture for adapters that expose filesystem mutators.
---

# Interface: ConformanceMutations

Defined in: [src/batteries/sandbox/conformance/index.ts:42](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L42)

Optional mutation fixture for adapters that expose filesystem mutators.

## Methods

### delete()?

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

Defined in: [src/batteries/sandbox/conformance/index.ts:54](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L54)

Remove a fixture; the optional operation must also resolve when the path is already absent.

#### Parameters

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

#### Returns

`Promise`<`void`>

***

### freePath()

```ts
freePath(options?: {
  directory?: "default" | "other";
}): Promise<string>;
```

Defined in: [src/batteries/sandbox/conformance/index.ts:46](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L46)

A fresh absent path with an existing parent, allowing rename checks without requiring mkdir.

#### Parameters

| Parameter            | Type                                          |
| -------------------- | --------------------------------------------- |
| `options?`           | { `directory?`: `"default"` | `"other"`; } |
| `options.directory?` | `"default"` | `"other"`                      |

#### Returns

`Promise`<`string`>

***

### makeFile()

```ts
makeFile(text: string, options?: {
  directory?: "default" | "other";
}): Promise<string>;
```

Defined in: [src/batteries/sandbox/conformance/index.ts:44](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L44)

A fresh disposable path in the selected existing directory, so checks cannot collide with repository files.

#### Parameters

| Parameter            | Type                                          |
| -------------------- | --------------------------------------------- |
| `text`               | `string`                                      |
| `options?`           | { `directory?`: `"default"` | `"other"`; } |
| `options.directory?` | `"default"` | `"other"`                      |

#### Returns

`Promise`<`string`>

***

### mkdir()?

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

Defined in: [src/batteries/sandbox/conformance/index.ts:58](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L58)

Create the requested directory hierarchy and accept an already-existing directory.

#### Parameters

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

#### Returns

`Promise`<`void`>

***

### read()

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

Defined in: [src/batteries/sandbox/conformance/index.ts:50](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L50)

Read fixture content after a mutation, proving that the operation preserved or wrote the expected text.

#### Parameters

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

#### Returns

`Promise`<`string`>

***

### rename()?

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

Defined in: [src/batteries/sandbox/conformance/index.ts:56](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L56)

Move a fixture and overwrite an existing destination, matching the filesystem contract.

#### Parameters

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

#### Returns

`Promise`<`void`>

***

### stat()

```ts
stat(path: string): Promise<{
  kind: string;
  size: number;
  version: string;
}>;
```

Defined in: [src/batteries/sandbox/conformance/index.ts:48](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L48)

Observe the post-mutation metadata, including entry kind for directory checks.

#### Parameters

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

#### Returns

`Promise`<{
`kind`: `string`;
`size`: `number`;
`version`: `string`;
}>

***

### write()

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

Defined in: [src/batteries/sandbox/conformance/index.ts:52](https://github.com/NHTIO/ADK/blob/master/src/src/batteries/sandbox/conformance/index.ts#L52)

Replace fixture content and make the new text observable through a subsequent read.

#### Parameters

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

#### Returns

`Promise`<`void`>
