#same #file #equal #inode

same-file

A simple crate for determining whether two file paths point to the same file.

7 releases (3 stable)

1.0.2 Jan 10, 2018
1.0.1 Dec 30, 2017
1.0.0 Oct 21, 2017
0.1.3 Feb 1, 2017
0.1.2 Jan 14, 2017

#1 in Filesystem

Download history 19591/week @ 2018-05-06 23798/week @ 2018-05-13 17748/week @ 2018-05-20 17638/week @ 2018-05-27 17014/week @ 2018-06-03 16938/week @ 2018-06-10 15686/week @ 2018-06-17 16454/week @ 2018-06-24 21216/week @ 2018-07-01 17987/week @ 2018-07-08 20394/week @ 2018-07-15 20047/week @ 2018-07-22 17515/week @ 2018-07-29

77,300 downloads per month

same-file

A safe and simple cross platform crate to determine whether two files or directories are the same.

Linux build status Windows build status

Dual-licensed under MIT or the UNLICENSE.

Documentation

https://docs.rs/same-file

Usage

Add this to your Cargo.toml:

[dependencies]
same-file = "1"

and this to your crate root:

extern crate same_file;

Example

The simplest use of this crate is to use the is_same_file function, which takes two file paths and returns true if and only if they refer to the same file:

extern crate same_file;

use same_file::is_same_file;

fn main() {
    assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
}
Unlicense/MIT license
  • No runtime deps

Reverse deps