pub trait FileOps {
// Required methods
fn rename(&self, from: &Path, to: &Path) -> Result<()>;
fn hard_link(&self, src: &Path, dst: &Path) -> Result<()>;
fn remove_file(&self, path: &Path) -> Result<()>;
fn sync_dir(&self, path: &Path) -> Result<()>;
}Expand description
Trait abstracting filesystem operations for testability.
Production code uses RealFileOps; tests can inject failures.