RemoteWorkspace class
A Workspace backed by a remote node over the connected ClientRuntime.
File operations run as one-shot commands on the node (ls, cat, a
base64 round-trip for writes), so they need only a shell session — the same
channel the terminal and agent use — and work from the web client too. (A
drive-RPC byte transport can be layered in later for binary/large files.)
- Implemented types
Constructors
- RemoteWorkspace({required ClientRuntime client, required String nodeId, required String rootPath, ShellFamily? shellFamily})
Properties
- commandRunner → CommandRunner
-
The streaming command runner backing the terminal panel and the agent's
run_commandtool — local process or remote exec.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isRemote → bool
-
Whether this targets a remote node (drives UI labels like the title bar).
no setteroverride
- rootPath → String
-
The absolute root the IDE is opened on.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → Future< void> -
Releases any resources (sessions, clients). Safe to call once.
override
-
createDirectory(
String absPath) → Future< void> -
Creates a directory at
absPath(recursively).override -
createFile(
String absPath) → Future< void> -
Creates an empty file at
absPath(with parent directories).override -
exec(
String command, {String? cwd}) → Future< WsExecResult> -
Runs
commandonce and returns its captured output (used for git).cwddefaults to rootPath.override -
exists(
String absPath) → Future< bool> -
Whether
absPathexists (file or directory).override -
isDirectory(
String absPath) → Future< bool> -
Whether
absPathexists and is a directory.override -
list(
String absPath) → Future< List< WsEntry> > -
Lists the entries of directory
absPath.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String absPath) → Future< String> -
Reads the UTF-8 contents of file
absPath.override -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String absPath, String content) → Future< void> -
Creates or overwrites file
absPathwithcontent.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited