On this page
tmux.Pane.CaptureToFile
- Module
- tmux
- Declared in
- Pane
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/pane_capture.go
- CaptureToFile ( ctx : context.Context , path : string , request : CapturePaneRequest ) ([]string, error)
-
CaptureToFile captures the receiver's exact linked pane through a tmux buffer and the file at path, returning the same lines
Pane.Capturereturns.Printed captures cannot safely cross a control connection, so
Pane.CaptureandPane.CaptureBytesuse a subprocess or reject a connection. CaptureToFile stages through a scratch buffer so capture, save, and cleanup can all use the connection's command lanes.path must name a file the tmux server can write and this process can read. It is replaced and left for the caller. Concurrent calls must use distinct paths. The scratch tmux buffer is deleted before return when possible.
Validation and version gating match
Pane.Capture. Capture, save, and file-read failures return an error with no lines; buffer cleanup is best effort.
0 declared, 0 inherited