pub enum Request {
Show 24 variants
FileRead {
path: PathBuf,
},
FileReadText {
path: PathBuf,
},
FileWrite {
path: PathBuf,
data: Vec<u8>,
},
FileWriteText {
path: PathBuf,
text: String,
},
FileAppend {
path: PathBuf,
data: Vec<u8>,
},
FileAppendText {
path: PathBuf,
text: String,
},
DirRead {
path: PathBuf,
depth: usize,
absolute: bool,
canonicalize: bool,
include_root: bool,
},
DirCreate {
path: PathBuf,
all: bool,
},
Remove {
path: PathBuf,
force: bool,
},
Copy {
src: PathBuf,
dst: PathBuf,
},
Rename {
src: PathBuf,
dst: PathBuf,
},
Watch {
path: PathBuf,
recursive: bool,
only: Vec<ChangeKind>,
except: Vec<ChangeKind>,
},
Unwatch {
path: PathBuf,
},
Exists {
path: PathBuf,
},
Metadata {
path: PathBuf,
canonicalize: bool,
resolve_file_type: bool,
},
SetPermissions {
path: PathBuf,
permissions: Permissions,
options: SetPermissionsOptions,
},
Search {
query: SearchQuery,
},
CancelSearch {
id: SearchId,
},
ProcSpawn {
cmd: Cmd,
environment: Environment,
current_dir: Option<PathBuf>,
pty: Option<PtySize>,
},
ProcKill {
id: ProcessId,
},
ProcStdin {
id: ProcessId,
data: Vec<u8>,
},
ProcResizePty {
id: ProcessId,
size: PtySize,
},
SystemInfo {},
Version {},
}
Expand description
Represents the payload of a request to be performed on the remote machine
Variants§
FileRead
Reads a file from the specified path on the remote machine
FileReadText
Reads a file from the specified path on the remote machine and treats the contents as text
FileWrite
Writes a file, creating it if it does not exist, and overwriting any existing content on the remote machine
Fields
FileWriteText
Writes a file using text instead of bytes, creating it if it does not exist, and overwriting any existing content on the remote machine
Fields
FileAppend
Appends to a file, creating it if it does not exist, on the remote machine
Fields
FileAppendText
Appends text to a file, creating it if it does not exist, on the remote machine
Fields
DirRead
Reads a directory from the specified path on the remote machine
Fields
depth: usize
Maximum depth to traverse with 0 indicating there is no maximum depth and 1 indicating the most immediate children within the directory
canonicalize: bool
Whether or not to canonicalize the resulting paths, meaning returning the canonical, absolute form of a path with all intermediate components normalized and symbolic links resolved
Note that the flag absolute must be true to have absolute paths returned, even if canonicalize is flagged as true
DirCreate
Creates a directory on the remote machine
Fields
Remove
Removes a file or directory on the remote machine
Fields
Copy
Copies a file or directory on the remote machine
Fields
Rename
Moves/renames a file or directory on the remote machine
Fields
Watch
Watches a path for changes
Fields
recursive: bool
If true, will recursively watch for changes within directories, othewise will only watch for changes immediately within directories
only: Vec<ChangeKind>
Filter to only report back specified changes
except: Vec<ChangeKind>
Filter to report back changes except these specified changes
Unwatch
Unwatches a path for changes, meaning no additional changes will be reported
Exists
Checks whether the given path exists
Metadata
Retrieves filesystem metadata for the specified path on the remote machine
Fields
SetPermissions
Sets permissions on a file, directory, or symlink on the remote machine
Fields
permissions: Permissions
New permissions to apply to the file, directory, or symlink
options: SetPermissionsOptions
Additional options to supply when setting permissions
Search
Searches filesystem using the provided query
Fields
query: SearchQuery
Query to perform against the filesystem
CancelSearch
Cancels an active search being run against the filesystem
ProcSpawn
Spawns a new process on the remote machine
Fields
environment: Environment
Environment to provide to the remote process
ProcKill
Kills a process running on the remote machine
ProcStdin
Sends additional data to stdin of running process
Fields
ProcResizePty
Resize pty of remote process
Fields
SystemInfo
Retrieve information about the server and the system it is on
Version
Retrieve information about the server’s protocol version