# server.Server.saveBuffer

- **Module:** server.Server
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/server.ts#L568
- **Page:** https://libtmux.org/reference/ts/server-server-savebuffer/

```
server.Server.saveBuffer(name: : string, path: : string, options: : { readonly append?: boolean }) -> 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");
```
