# server.Server.load_buffer

- **Module:** server.Server
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server.rs#L942
- **Page:** https://libtmux.org/en/rs/latest/reference/server-server-load_buffer/

```
server.Server.load_buffer(self, name: Option<&str>, path: impl AsRef<Path>) -> Result<(), Error>
```

Fill a paste buffer from a file, letting tmux read it.

[`Self::set_buffer`] carries the data as a command argument, which the
kernel caps: on Linux a single argument stops at `MAX_ARG_STRLEN`,
128 KiB, and a larger one fails with "argument list too long" before
tmux sees it. tmux opens the file itself here, so size is the file
system's problem rather than the command line's.

`path` is tmux's to resolve, and tmux reads it as the user running the
server, which is not necessarily this process.

# Errors

Returns an error when tmux cannot read the path.
