> ## Documentation Index
> Fetch the complete documentation index at: https://chart-spec.enchor.us/llms.txt
> Use this file to discover all available pages before exploring further.

# writeSavePlanFile()

```ts theme={null}
function writeSavePlanFile(file, stream): Promise<void>;
```

Writes one file of a save plan to a stream, reading its byte ranges in chunks, then closes the stream. If writing
fails, the stream is aborted and the error is thrown.

## Parameters

| Parameter | Type |
| - | - |
| `file` | [`PlannedFile`](https://chart-spec.enchor.us/scan-chart/api/index/interfaces/PlannedFile) |
| `stream` | `WritableStream`\<`Uint8Array`\<`ArrayBufferLike`>> |

## Returns

`Promise`\<`void`>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.