Workspace class abstract
The filesystem + command operations the IDE runs against.
Abstracting these behind an async, dart:io-free port lets the same IDE
engine target the local filesystem (rootPath on this machine), a remote
node over the connected client, or a host web app — and keeps the engine
compilable to JavaScript. All paths are absolute and rooted under
rootPath; implementations resolve and (for remote) sandbox them.
- Implementers
Constructors
Properties
- commandRunner → CommandRunner
-
The streaming command runner backing the terminal panel and the agent's
run_commandtool — local process or remote exec.no setter - 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 setter
- rootPath → String
-
The absolute root the IDE is opened on.
no setter
- 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.
-
createDirectory(
String absPath) → Future< void> -
Creates a directory at
absPath(recursively). -
createFile(
String absPath) → Future< void> -
Creates an empty file at
absPath(with parent directories). -
exec(
String command, {String? cwd}) → Future< WsExecResult> -
Runs
commandonce and returns its captured output (used for git).cwddefaults to rootPath. -
exists(
String absPath) → Future< bool> -
Whether
absPathexists (file or directory). -
isDirectory(
String absPath) → Future< bool> -
Whether
absPathexists and is a directory. -
list(
String absPath) → Future< List< WsEntry> > -
Lists the entries of directory
absPath. -
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. -
toString(
) → String -
A string representation of this object.
inherited
-
write(
String absPath, String content) → Future< void> -
Creates or overwrites file
absPathwithcontent.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited