Trait distant_core::SessionChannelExt [−][src]
pub trait SessionChannelExt {
Show 16 methods
fn append_file(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
data: impl Into<Vec<u8>>
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn append_file_text(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
data: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn copy(
&mut self,
tenant: impl Into<String>,
src: impl Into<PathBuf>,
dst: impl Into<PathBuf>
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn create_dir(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
all: bool
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn exists(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>
) -> Pin<Box<dyn Future<Output = Result<bool, SessionChannelExtError>> + Send + '_>>;
fn metadata(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
canonicalize: bool,
resolve_file_type: bool
) -> Pin<Box<dyn Future<Output = Result<Metadata, SessionChannelExtError>> + Send + '_>>;
fn read_dir(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
depth: usize,
absolute: bool,
canonicalize: bool,
include_root: bool
) -> Pin<Box<dyn Future<Output = Result<(Vec<DirEntry>, Vec<Failure>), SessionChannelExtError>> + Send + '_>>;
fn read_file(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, SessionChannelExtError>> + Send + '_>>;
fn read_file_text(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>
) -> Pin<Box<dyn Future<Output = Result<String, SessionChannelExtError>> + Send + '_>>;
fn remove(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
force: bool
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn rename(
&mut self,
tenant: impl Into<String>,
src: impl Into<PathBuf>,
dst: impl Into<PathBuf>
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn spawn(
&mut self,
tenant: impl Into<String>,
cmd: impl Into<String>,
args: Vec<impl Into<String>>
) -> Pin<Box<dyn Future<Output = Result<RemoteProcess, RemoteProcessError>> + Send + '_>>;
fn spawn_lsp(
&mut self,
tenant: impl Into<String>,
cmd: impl Into<String>,
args: Vec<impl Into<String>>
) -> Pin<Box<dyn Future<Output = Result<RemoteLspProcess, RemoteProcessError>> + Send + '_>>;
fn system_info(
&mut self,
tenant: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<SystemInfo, SessionChannelExtError>> + Send + '_>>;
fn write_file(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
data: impl Into<Vec<u8>>
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
fn write_file_text(
&mut self,
tenant: impl Into<String>,
path: impl Into<PathBuf>,
data: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<(), SessionChannelExtError>> + Send + '_>>;
}
Expand description
Provides convenience functions on top of a SessionChannel
Required methods
Appends to a remote file using the data from a collection of bytes
Appends to a remote file using the data from a string
Copies a remote file or directory from src to dst
Creates a remote directory, optionally creating all parent components if specified
Checks if a path exists on a remote machine
Retrieves metadata about a path on a remote machine
Reads entries from a directory, returning a tuple of directory entries and failures
Reads a remote file as a collection of bytes
Returns a remote file as a string
Removes a remote file or directory, supporting removal of non-empty directories if force is true
Renames a remote file or directory from src to dst
Spawns a process on the remote machine
Spawns an LSP process on the remote machine
fn system_info(
&mut self,
tenant: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<SystemInfo, SessionChannelExtError>> + Send + '_>>
fn system_info(
&mut self,
tenant: impl Into<String>
) -> Pin<Box<dyn Future<Output = Result<SystemInfo, SessionChannelExtError>> + Send + '_>>
Retrieves information about the remote system
Writes a remote file with the data from a collection of bytes