CopyDriver

Trait CopyDriver 

Source
pub trait CopyDriver {
    // Required method
    fn copy(
        &self,
        sources: Vec<PathBuf>,
        dest: &Path,
        stats: Arc<dyn StatusUpdater>,
    ) -> Result<()>;
}
Expand description

The trait specifying driver operations; drivers should implement this.

Required Methods§

Source

fn copy( &self, sources: Vec<PathBuf>, dest: &Path, stats: Arc<dyn StatusUpdater>, ) -> Result<()>

Recursively copy a set of directories or files to a destination. dest can be a file if a single file is provided the source. StatusUpdater.send() will be called with StatusUpdate objects depending on the driver configuration. copy() itself will block until all work is complete, so should be run in a thread if real-time updates are required.

Implementors§

Source§

impl CopyDriver for libxcp::drivers::parblock::Driver

Source§

impl CopyDriver for libxcp::drivers::parfile::Driver