|
|
@ -1,5 +1,5 @@
|
|
|
|
use miette::Result;
|
|
|
|
use miette::Result;
|
|
|
|
use std::path::Path;
|
|
|
|
use std::{fs::Permissions, path::Path};
|
|
|
|
|
|
|
|
|
|
|
|
mod buffered;
|
|
|
|
mod buffered;
|
|
|
|
pub use buffered::BufferedFsAccess;
|
|
|
|
pub use buffered::BufferedFsAccess;
|
|
|
@ -11,6 +11,9 @@ pub trait FsAccess {
|
|
|
|
/// Copy src to dst
|
|
|
|
/// Copy src to dst
|
|
|
|
fn copy(&mut self, src: &Path, dst: &Path) -> Result<()>;
|
|
|
|
fn copy(&mut self, src: &Path, dst: &Path) -> Result<()>;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Sets permissions on a file
|
|
|
|
|
|
|
|
fn set_permissions(&mut self, path: &Path, perm: Permissions) -> Result<()>;
|
|
|
|
|
|
|
|
|
|
|
|
/// Persist the changes if necessary
|
|
|
|
/// Persist the changes if necessary
|
|
|
|
fn persist(&mut self) -> Result<()>;
|
|
|
|
fn persist(&mut self) -> Result<()>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|