pub struct WorkspaceFs { /* private fields */ }Expand description
Production workspace implementation using the real filesystem.
All file operations are performed relative to the repository root using std::fs.
Implementations§
Trait Implementations§
Source§impl Clone for WorkspaceFs
impl Clone for WorkspaceFs
Source§fn clone(&self) -> WorkspaceFs
fn clone(&self) -> WorkspaceFs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkspaceFs
impl Debug for WorkspaceFs
Source§impl Workspace for WorkspaceFs
impl Workspace for WorkspaceFs
Source§fn read(&self, relative: &Path) -> Result<String>
fn read(&self, relative: &Path) -> Result<String>
Read a file relative to the repository root.
Source§fn read_bytes(&self, relative: &Path) -> Result<Vec<u8>>
fn read_bytes(&self, relative: &Path) -> Result<Vec<u8>>
Read a file as bytes relative to the repository root.
Source§fn write(&self, relative: &Path, content: &str) -> Result<()>
fn write(&self, relative: &Path, content: &str) -> Result<()>
Write content to a file relative to the repository root.
Creates parent directories if they don’t exist.
Source§fn write_bytes(&self, relative: &Path, content: &[u8]) -> Result<()>
fn write_bytes(&self, relative: &Path, content: &[u8]) -> Result<()>
Write bytes to a file relative to the repository root.
Creates parent directories if they don’t exist.
Source§fn append_bytes(&self, relative: &Path, content: &[u8]) -> Result<()>
fn append_bytes(&self, relative: &Path, content: &[u8]) -> Result<()>
Append bytes to a file relative to the repository root.
Creates the file if it doesn’t exist. Creates parent directories if needed.
Source§fn exists(&self, relative: &Path) -> bool
fn exists(&self, relative: &Path) -> bool
Check if a path exists relative to the repository root.
Source§fn is_file(&self, relative: &Path) -> bool
fn is_file(&self, relative: &Path) -> bool
Check if a path is a file relative to the repository root.
Source§fn is_dir(&self, relative: &Path) -> bool
fn is_dir(&self, relative: &Path) -> bool
Check if a path is a directory relative to the repository root.
Source§fn remove(&self, relative: &Path) -> Result<()>
fn remove(&self, relative: &Path) -> Result<()>
Remove a file relative to the repository root.
Source§fn remove_if_exists(&self, relative: &Path) -> Result<()>
fn remove_if_exists(&self, relative: &Path) -> Result<()>
Remove a file if it exists, silently succeeding if it doesn’t.
Source§fn remove_dir_all(&self, relative: &Path) -> Result<()>
fn remove_dir_all(&self, relative: &Path) -> Result<()>
Remove a directory and all its contents relative to the repository root. Read more
Source§fn remove_dir_all_if_exists(&self, relative: &Path) -> Result<()>
fn remove_dir_all_if_exists(&self, relative: &Path) -> Result<()>
Remove a directory and all its contents if it exists, silently succeeding if it doesn’t.
Source§fn create_dir_all(&self, relative: &Path) -> Result<()>
fn create_dir_all(&self, relative: &Path) -> Result<()>
Create a directory and all parent directories relative to the repository root.
Source§fn read_dir(&self, relative: &Path) -> Result<Vec<DirEntry>>
fn read_dir(&self, relative: &Path) -> Result<Vec<DirEntry>>
List entries in a directory relative to the repository root. Read more
Source§fn rename(&self, from: &Path, to: &Path) -> Result<()>
fn rename(&self, from: &Path, to: &Path) -> Result<()>
Rename/move a file from one path to another relative to the repository root. Read more
Source§fn write_atomic(&self, relative: &Path, content: &str) -> Result<()>
fn write_atomic(&self, relative: &Path, content: &str) -> Result<()>
Write content to a file atomically using temp file + rename pattern. Read more
Source§fn set_readonly(&self, relative: &Path) -> Result<()>
fn set_readonly(&self, relative: &Path) -> Result<()>
Set a file to read-only permissions. Read more
Source§fn set_writable(&self, relative: &Path) -> Result<()>
fn set_writable(&self, relative: &Path) -> Result<()>
Set a file to writable permissions. Read more
Source§fn absolute_str(&self, relative: &str) -> String
fn absolute_str(&self, relative: &str) -> String
Resolve a relative path to an absolute path as a string.
Source§fn agent_logs(&self) -> PathBuf
fn agent_logs(&self) -> PathBuf
Path to the
.agent/logs directory.Source§fn commit_message(&self) -> PathBuf
fn commit_message(&self) -> PathBuf
Path to
.agent/commit-message.txt.Source§fn checkpoint(&self) -> PathBuf
fn checkpoint(&self) -> PathBuf
Path to
.agent/checkpoint.json.Source§fn start_commit(&self) -> PathBuf
fn start_commit(&self) -> PathBuf
Path to
.agent/start_commit.Source§fn review_baseline(&self) -> PathBuf
fn review_baseline(&self) -> PathBuf
Path to
.agent/review_baseline.txt.Source§fn prompt_backup(&self) -> PathBuf
fn prompt_backup(&self) -> PathBuf
Path to
.agent/PROMPT.md.backup.Source§fn agent_config(&self) -> PathBuf
fn agent_config(&self) -> PathBuf
Path to
.agent/config.toml.Source§fn agents_toml(&self) -> PathBuf
fn agents_toml(&self) -> PathBuf
Path to
.agent/agents.toml.Source§fn pipeline_log(&self) -> PathBuf
fn pipeline_log(&self) -> PathBuf
Path to
.agent/logs/pipeline.log.Auto Trait Implementations§
impl Freeze for WorkspaceFs
impl RefUnwindSafe for WorkspaceFs
impl Send for WorkspaceFs
impl Sync for WorkspaceFs
impl Unpin for WorkspaceFs
impl UnwindSafe for WorkspaceFs
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more