# Server.saveBuffer(named:to:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Buffers.swift#L89
- **Page:** https://libtmux.org/en/swift/latest/reference/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`
