# Server.saveBuffer(named:to:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Buffers.swift#L88
- **Page:** https://libtmux.org/reference/swift/server-savebuffer(named-to-)/

```
Server.saveBuffer(named:to:)(named: String?, to: String) -> ()
```

Writes a buffer to a file, letting tmux do the writing.

The counterpart to ``loadBuffer(from:named:)``, and the way to get a
buffer larger than a reply out of tmux: ``buffer(named:)`` hands back
what one command printed, while this streams to a path.

## Raises

- `TmuxError`
