зеркало из https://github.com/mozilla/gecko-dev.git
cd6c97ea60
MozReview-Commit-ID: BOgu41N351y --HG-- rename : third_party/rust/serde/.cargo-checksum.json => third_party/rust/serde-0.8.23/.cargo-checksum.json rename : third_party/rust/serde/Cargo.toml => third_party/rust/serde-0.8.23/Cargo.toml rename : third_party/rust/serde/src/bytes.rs => third_party/rust/serde-0.8.23/src/bytes.rs rename : third_party/rust/serde/src/de/impls.rs => third_party/rust/serde-0.8.23/src/de/impls.rs rename : third_party/rust/serde/src/de/mod.rs => third_party/rust/serde-0.8.23/src/de/mod.rs rename : third_party/rust/serde/src/de/value.rs => third_party/rust/serde-0.8.23/src/de/value.rs rename : third_party/rust/serde/src/error.rs => third_party/rust/serde-0.8.23/src/error.rs rename : third_party/rust/serde/src/lib.rs => third_party/rust/serde-0.8.23/src/lib.rs rename : third_party/rust/serde/src/macros.rs => third_party/rust/serde-0.8.23/src/macros.rs rename : third_party/rust/serde/src/ser/impls.rs => third_party/rust/serde-0.8.23/src/ser/impls.rs rename : third_party/rust/serde/src/ser/mod.rs => third_party/rust/serde-0.8.23/src/ser/mod.rs extra : rebase_source : d015147c7a6c01b34c5a1abf035d71f8ecfe0c12 |
||
---|---|---|
.. | ||
examples | ||
src | ||
.cargo-checksum.json | ||
.cargo-ok | ||
.gitignore | ||
.travis.yml | ||
COPYING | ||
Cargo.toml | ||
README.md | ||
appveyor.yml |
README.md
same-file
A safe and simple cross platform crate to determine whether two files or directories are the same.
Dual-licensed under MIT or the UNLICENSE.
Documentation
Usage
Add this to your Cargo.toml
:
[dependencies]
same-file = "0.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());
}