Function walkdir::is_same_file
[−]
[src]
pub fn is_same_file<P, Q>(path1: P, path2: Q) -> Result<bool, Error> where
P: AsRef<Path>,
Q: AsRef<Path>,
Returns true if the two file paths may correspond to the same file.
If there was a problem accessing either file path, then an error is returned.
Note that it's possible for this to produce a false positive on some platforms. Namely, this can return true even if the two file paths don't resolve to the same file.
Example
use same_file::is_same_file; assert!(is_same_file("./foo", "././foo").unwrap_or(false));