# server.Server.saveBuffer

- **Module:** server.Server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/server.ts#L614
- **Page:** https://libtmux.org/en/ts/latest/reference/server-server-savebuffer/

```
server.Server.saveBuffer(name: : string, path: : string, options: : SaveBufferOptions) -> Promise<void>
```

Write a paste buffer to a file instead of reading it back.

`showBuffer` returns the contents through this process; for a large buffer
that means holding it in memory to put it somewhere else. tmux writes the
file itself, on the machine tmux is running on.

## Example

```ts
await server.saveBuffer("captured", "/tmp/build.log");
```
