Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

server.Server.saveBuffer

TypeScript

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
Python Ruby Lua Rust Go Java .NETC++Swift
saveBuffer ( name : : string , path : : string , options : : SaveBufferOptions ) → Promise<void>
method [source]
method [source]
saveBuffer

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.

In other ports Write a paste buffer to a file

Examples

await server.saveBuffer("captured", "/tmp/build.log");
>>> import pathlib
>>> server.set_buffer('save_me')
>>> path = pathlib.Path(request.config.rootdir) / '..' / 'tmp_save.txt'
>>> server.save_buffer(str(path))

0 declared, 0 inherited

Esc

Type to search.