1 stable release

1.0.0 Aug 5, 2021

#197 in Windows APIs

MIT license

47KB
1K SLoC

Robocopyrs

Robocopy Command Wrapper

System Requirements

Windows NT 4 or later

License

MIT


lib.rs:

Robocopyrs is a wrapper for the robocopy command in Windows.

use robocopyrs::RobocopyCommand;
use robocopyrs::CopyMode;
use robocopyrs::FileProperties;
use robocopyrs::DirectoryProperties;
use std::path::Path;

let command = RobocopyCommand {
    source: Path::new("./source"),
    destination: Path::new("./destination"),
    copy_mode: Some(CopyMode::RESTARTABLE_MODE_BACKUP_MODE_FALLBACK),
    structure_and_size_zero_files_only: true,
    copy_file_properties: Some(FileProperties::all()),
    copy_dir_properties: Some(DirectoryProperties::all()),
    ..RobocopyCommand::default()
};

command.execute()?;

No runtime deps