Trait dir_update::DirUpdate
source · pub trait DirUpdate {
fn on_new_file_update(_file: &Path) { ... }
fn on_new_file_skip(_file: &Path) { ... }
fn on_io_error(file: &Path, error: Error) { ... }
fn on_walk_error(error: Error) { ... }
fn update_dir(from: &Path, to: &Path) -> Result<usize, UpdateError> { ... }
}
Expand description
Describes how to perform update
Provided Methods
sourcefn on_new_file_update(_file: &Path)
fn on_new_file_update(_file: &Path)
Hook to handle change to file
sourcefn on_new_file_skip(_file: &Path)
fn on_new_file_skip(_file: &Path)
Hook to handle no change to file
sourcefn on_io_error(file: &Path, error: Error)
fn on_io_error(file: &Path, error: Error)
Specifies general error handler
sourcefn on_walk_error(error: Error)
fn on_walk_error(error: Error)
Specifies error handler for WalkDir
By default prints error to stderr.
sourcefn update_dir(from: &Path, to: &Path) -> Result<usize, UpdateError>
fn update_dir(from: &Path, to: &Path) -> Result<usize, UpdateError>
Performs update of to
directory and returns number of updated files