Copy

Function Copy 

Source
pub fn Copy(
    Source: PathBuf,
    Target: PathBuf,
    Overwrite: bool,
) -> ActionEffect<Arc<dyn FileSystemWriter>, CommonError, ()>
Expand description

Creates an effect that, when executed, will copy a file or directory from a source path to a target path.

It uses the FileSystemWriter capability from the environment to perform the actual file I/O.

§Parameters

  • Source: The PathBuf of the file or directory to copy.
  • Target: The PathBuf of the destination.
  • Overwrite: If true, an existing file or directory at the target path will be overwritten.

§Returns

An ActionEffect that resolves to () on success.