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

server.Server.snapshot

TypeScript

View as Markdown

Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
Other languages
Python RubyLua Rust GoJava.NET C++ Swift
snapshot ( options : : SnapshotOptions = {} ) → Promise<ServerSnapshot>
method [source]
method [source]
snapshot

Acquire an immutable view of the server at this instant.

Acquisition is the only step that talks to tmux. Everything reachable from the returned value resolves locally, so traversal and filtering issue no commands and an earlier snapshot keeps reporting its own instant.

Examples

const now = await server.snapshot();
now.windows.count();
In other ports Capture the whole hierarchy at one instant

0 declared, 0 inherited

Esc

Type to search.