pub struct CopyFolder { /* private fields */ }Expand description
The folder the person picked, open for the copies one call makes.
Implementations§
Source§impl CopyFolder
impl CopyFolder
Sourcepub async fn open(
folder: PathBuf,
bugs: BugSinkRef,
) -> Result<Self, CopyPathError>
pub async fn open( folder: PathBuf, bugs: BugSinkRef, ) -> Result<Self, CopyPathError>
Open folder, an absolute path to a folder whose path is valid
Unicode. The folder itself may be reached through a link: the person
picked it. A panic in the copies’ work whose caller stopped waiting
goes to bugs (E15).
Sourcepub async fn plan(
&self,
paths: Vec<RelativePath>,
) -> Result<CopyPlan, CopyPathError>
pub async fn plan( &self, paths: Vec<RelativePath>, ) -> Result<CopyPlan, CopyPathError>
Plan the copies at paths, each name written as the one rule for
every platform makes it (§17.3). Only what lies below the folder is
checked for links.
Sourcepub async fn create_folder(&self, path: PathBuf) -> Result<bool, FileError>
pub async fn create_folder(&self, path: PathBuf) -> Result<bool, FileError>
Make the folder at path, a path of a plan, and sync the folder
holding it. True when this call made it; false when a folder was
there already, made by someone else, which the call never removes.
Sourcepub async fn create_copy(
&self,
temporary: PathBuf,
) -> Result<CopyWriter, FileError>
pub async fn create_copy( &self, temporary: PathBuf, ) -> Result<CopyWriter, FileError>
Start a copy’s bytes at temporary, a new file in its final folder.
Sourcepub async fn observe(
&self,
path: &Path,
) -> Result<ObservedFile, ObservationError>
pub async fn observe( &self, path: &Path, ) -> Result<ObservedFile, ObservationError>
Observe the copy at path, a path below the folder, without reading
its bytes: its size and modification time, for the original it
becomes.