pub struct FsClient { /* private fields */ }Expand description
FileSystem client for Sage agents.
Created via FsClient::new() or FsClient::with_root().
Implementations§
Source§impl FsClient
impl FsClient
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create a new filesystem client from environment variables.
Reads:
SAGE_FS_ROOT: Root directory for filesystem operations (default: “.”)
Sourcepub fn with_root(root: PathBuf) -> Self
pub fn with_root(root: PathBuf) -> Self
Create a new filesystem client with the given root directory.
Sourcepub async fn read(&self, path: String) -> SageResult<String>
pub async fn read(&self, path: String) -> SageResult<String>
Sourcepub async fn exists(&self, path: String) -> SageResult<bool>
pub async fn exists(&self, path: String) -> SageResult<bool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FsClient
impl RefUnwindSafe for FsClient
impl Send for FsClient
impl Sync for FsClient
impl Unpin for FsClient
impl UnsafeUnpin for FsClient
impl UnwindSafe for FsClient
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