Server.HasSessionAsync
Reports whether a session exists.
Source and package
- Qualified name
-
LibTmux .Server. Has Session Async - Namespace
- LibTmux
- Declared in
Server- Package
- LibTmux
- Source
- src/LibTmux/Server.Lifecycle.cs
-
- Parameters
-
-
exact(bool) – Whether the name must match in full.Default
true -
cancellationToken(CancellationToken ) – Cancels the tmux command.Default
default
- Returns
-
True when tmux reports the session.
Recorded calls
source callsThe C# reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Server.HasSessionAsync.
tmux command
task materialThe tmux commands behind HasSessionAsync.
tmux C API
task materialThe C declarations in tmux that implement these commands.
Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.
Create a session and its first pane
- 1
cmd_new_session_exec - calls → 2
spawn_window - calls → 3
spawn_pane - calls → 4
window_add_pane - calls → 5
window_pane_create
Guides
task materialPages that discuss HasSessionAsync.
In other ports
task equivalence 7 other ports mappedSource-verified mappings for Whether a session with this name exists. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.
| Port | API | Differs from C# |
|---|---|---|
| C# | Lib Reports whether a session exists. | This page |
| Python | libtmux Return True if session exists. | None recorded in the model |
| TypeScript | server Whether a session with this name exists. | None recorded in the model |
| Rust | server Report whether a session with this exact name exists. | None recorded in the model |
| Go | tmux HasSession reports whether Target selects a session. With Pattern false it compares session names exactly; with Pattern true, tmux may resolve IDs, client TTYs, unique prefixes, or globs. Pattern-mode completed nonzero exits are misses. Exact-name lookup treats ErrNoServer as a miss and returns other failures. | None recorded in the model |
| Java | io Whether a session with this name exists. | None recorded in the model |
| Swift | Server Whether a session by this name or id exists. | None recorded in the model |
| Raku | Lib Test one exact session ID or name. Acquisition and identity failures still throw. | Checks one exact ID or name; acquisition and identity failures still throw. |
No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
no equivalent on Server
No direct public OCaml equivalent is recorded for this operation.
No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.
No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.