# MemoryReadFileSystem

Class · implements [`ReadFileSystem`](https://api.playcanvas.com/splat-transform/interfaces/ReadFileSystem.md)

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/io/read/memory-file-system.ts#L70

ReadFileSystem for reading from named memory buffers.
Useful for testing or when data is already in memory.

## Methods

### createSource

```ts
createSource(filename: string, progress?: ProgressCallback): Promise<ReadSource>
```

Create a readable source for the given path/identifier.

**Parameters**

- `filename` (`string`): Path or identifier for the resource
- `progress` ([`ProgressCallback`](https://api.playcanvas.com/splat-transform/types/ProgressCallback.md), optional): Optional callback for progress reporting

**Returns** `Promise<`[`ReadSource`](https://api.playcanvas.com/splat-transform/interfaces/ReadSource.md)`>`: Promise resolving to a ReadSource

### get

```ts
get(name: string): Uint8Array<ArrayBufferLike>
```

Get a stored buffer by name.

**Parameters**

- `name` (`string`): Name/path of the buffer

**Returns** `Uint8Array<ArrayBufferLike>`: The stored data or undefined

### set

```ts
set(name: string, data: Uint8Array): void
```

Store a named buffer.

**Parameters**

- `name` (`string`): Name/path for the buffer
- `data` (`Uint8Array`): Data to store
