gecko-dev/third_party/rust/same-file
Nathan Froyd b93bf873ba Bug 1502964 - part 2 - update winapi to froydnj/winapi-rs#aarch64; r=ted.mielczarek 2018-11-02 10:56:08 -04:00
..
examples No bug - Revendor rust dependencies 2018-04-06 13:23:37 +00:00
src No bug - Revendor rust dependencies 2018-04-06 13:23:37 +00:00
.cargo-checksum.json Bug 1502964 - part 2 - update winapi to froydnj/winapi-rs#aarch64; r=ted.mielczarek 2018-11-02 10:56:08 -04:00
COPYING
Cargo.toml No bug - Revendor rust dependencies 2018-04-06 13:23:37 +00:00
README.md No bug - Revendor rust dependencies 2018-04-06 13:23:37 +00:00
appveyor.yml

README.md

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());
}