pub struct Workspace { /* private fields */ }Implementations§
Source§impl Workspace
impl Workspace
pub fn new( staging_dir: impl AsRef<Path>, dest_dir: impl AsRef<Path>, ) -> Result<Self>
pub fn path(&self) -> &Path
pub fn staging_path(&self) -> &Path
pub fn destination_path(&self) -> &Path
pub fn exists(&self, relative_path: impl AsRef<Path>) -> Result<bool>
pub fn create_dir(&self, relative_path: impl AsRef<Path>) -> Result<()>
pub fn create_dir_all(&self, relative_path: impl AsRef<Path>) -> Result<()>
pub fn write( &self, relative_path: impl AsRef<Path>, content: &[u8], ) -> Result<()>
pub fn write_with_options( &self, relative_path: impl AsRef<Path>, content: &[u8], options: Options, ) -> Result<()>
pub fn copy_file( &self, source: impl AsRef<Path>, relative_path: impl AsRef<Path>, ) -> Result<u64>
pub fn link_or_copy_file( &self, source: impl AsRef<Path>, relative_path: impl AsRef<Path>, options: Options, ) -> Result<()>
pub fn stage_file_by_size( &self, source: impl AsRef<Path>, relative_path: impl AsRef<Path>, threshold_bytes: u64, options: Options, ) -> Result<()>
pub fn read(&self, relative_path: impl AsRef<Path>) -> Result<Vec<u8>>
pub fn report(&self) -> Result<WorkspaceReport>
pub fn commit(self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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