# LibTmux.Server.SaveBufferAsync

- **Module:** LibTmux.Server
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Server.Buffers.cs#L50
- **Page:** https://libtmux.org/reference/dotnet/libtmux-server-savebufferasync/

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

Writes a paste 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.
