Function dupcheck::duplicates_within [] [src]

pub fn duplicates_within(dirs: &[PathBuf]) -> Result<Vec<FileHash>>

Checks for any duplicate files within the specified directories.

This checks for any duplicates amongst all files within all specified directories. If multiple directories need to be checked separately, this function will need to be called for each directory individually.

Errors

Returns an error if any paths within dirs are not directories or if there are I/O errors while trying to read files or directories.

Examples

use std::path::PathBuf;

let dirs = vec![
    PathBuf::from("foo"),
    PathBuf::from("bar")
];

let dup_result = dupcheck::duplicates_within(&dirs);