pub struct FileService { /* private fields */ }Expand description
Service for file operations in containers.
Implementations§
Source§impl FileService
impl FileService
Sourcepub async fn list(
&self,
container_id: &str,
path: &str,
) -> Result<Vec<FileInfo>, Error>
pub async fn list( &self, container_id: &str, path: &str, ) -> Result<Vec<FileInfo>, Error>
List files in a container directory.
§Arguments
container_id- Container IDpath- Directory path to list
§Example
let client = RexecClient::new("https://example.com", "token");
let files = client.files().list("container-id", "/home").await?;
for f in files {
let icon = if f.is_dir { "📁" } else { "📄" };
println!("{} {}", icon, f.name);
}Auto Trait Implementations§
impl !RefUnwindSafe for FileService
impl !UnwindSafe for FileService
impl Freeze for FileService
impl Send for FileService
impl Sync for FileService
impl Unpin for FileService
impl UnsafeUnpin for FileService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more