pub struct FileOperations;Expand description
File operations wrapper ensuring PathResolver validation
Implementations§
Source§impl FileOperations
impl FileOperations
Sourcepub fn create_file(path: &str, content: &str) -> ExecutionResult<()>
pub fn create_file(path: &str, content: &str) -> ExecutionResult<()>
Sourcepub fn modify_file(path: &str, diff: &str) -> ExecutionResult<()>
pub fn modify_file(path: &str, diff: &str) -> ExecutionResult<()>
Sourcepub fn delete_file(path: &str) -> ExecutionResult<()>
pub fn delete_file(path: &str) -> ExecutionResult<()>
Sourcepub fn backup_file(path: &str) -> ExecutionResult<PathBuf>
pub fn backup_file(path: &str) -> ExecutionResult<PathBuf>
Sourcepub fn restore_from_backup(
file_path: &str,
backup_path: &str,
) -> ExecutionResult<()>
pub fn restore_from_backup( file_path: &str, backup_path: &str, ) -> ExecutionResult<()>
Sourcepub fn file_exists(path: &str) -> ExecutionResult<bool>
pub fn file_exists(path: &str) -> ExecutionResult<bool>
Auto Trait Implementations§
impl Freeze for FileOperations
impl RefUnwindSafe for FileOperations
impl Send for FileOperations
impl Sync for FileOperations
impl Unpin for FileOperations
impl UnwindSafe for FileOperations
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