CwdScan class

The outcome of feeding one chunk of remote stdout to a CwdMarker.

output is the clean process output to forward to the user (with any marker line removed); the remaining fields carry the state reported by a marker that completed within this chunk (the last one if several did), or null if none did or the field was empty.

Constructors

CwdScan(Uint8List output, String? cwd, [String? branch, String? gitStatus, String? privilege, bool completed = false, int? exitCode])
Creates a scan result.
const

Properties

branch → String?
The git branch of the remote cwd, or null when it is not a git repo.
final
completed → bool
Whether a marker (full or ping) terminated in this chunk — i.e. the remote command finished and the shell is back at its prompt. A ping sets this without populating cwd/branch/… so the client can repaint the prompt in the right place (after the command's output) while keeping its cached state.
final
cwd → String?
The current working directory, if a marker completed in this chunk.
final
exitCode → int?
The exit code of the command that preceded a completed CwdMarker.command when it was emitted by the exit-code-carrying CwdMarker.agentCommand (an extra 5th marker field). null for the regular cwd/ping markers, which do not report it.
final
gitStatus → String?
Compact git status (+staged ~modified ?untracked), or null when clean or not a git repo.
final
hashCode → int
The hash code for this object.
no setterinherited
output → Uint8List
Process output to forward, with marker lines stripped.
final
privilege → String?
Privilege label (root) when the remote session is the superuser, else null.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited