# LibTmux.TmuxBuffers.SaveAsync

- **Module:** LibTmux.TmuxBuffers
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/Buffers/TmuxBuffers.cs#L55
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-tmuxbuffers-saveasync/

```
LibTmux.TmuxBuffers.SaveAsync(path: string, name: string?, append: bool, cancellationToken: CancellationToken) -> Task
```

Writes a buffer to a file.

## Parameters

- `path` (string): The file to write.
- `name` (string?): The buffer to write, or null for the most recent.
- `append` (bool): Whether the buffer joins what the file already holds.
- `cancellationToken` (CancellationToken): Cancels the tmux command.

## Returns

A task that completes once tmux has written it.

## Raises

- `ArgumentException`: <paramref name="path" /> is blank.
