[−][src]Struct folder_compare::FolderCompare
Fields
changed_files: Vec<PathBuf>
new_files: Vec<PathBuf>
Implementations
impl FolderCompare
[src]
pub fn new(
path1: &Path,
path2: &Path,
excluded: &Vec<String>
) -> Result<Self, Error>
[src]
path1: &Path,
path2: &Path,
excluded: &Vec<String>
) -> Result<Self, Error>
Instantiates an object of FolderCompare and does the comparison between two Path
directories and delivers itself consisting of
two lists of PathBuf
containing changed and new (only existing in first Directory) files.
It takes a Vec<&str>
as argument for excluding specific substrings in the path (e.g. file extensions like .txt).
Example
The following code recursively iterates over two directories and returns lists of changed and new files
use std::path::Path; use folder_compare; use folder_compare::FolderCompare; let excluded = vec![".doc".to_string(), ".txt".to_string()]; let result = FolderCompare::new(Path::new("/tmp/a"), Path::new("/tmp/b"), &excluded).unwrap(); let changed_files = result.changed_files; let new_filed = result.new_files;
Auto Trait Implementations
impl RefUnwindSafe for FolderCompare
impl Send for FolderCompare
impl Sync for FolderCompare
impl Unpin for FolderCompare
impl UnwindSafe for FolderCompare
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,