Bug 1608150 [wpt PR 21112] - Add missing space in `./wpt lint` command line docs...
[gecko.git] / third_party / rust / same-file / README.md
blob2a114b9a460f3205d46138f9cfadc520593dfe2e
1 same-file
2 =========
3 A safe and simple **cross platform** crate to determine whether two files or
4 directories are the same.
6 [![Linux build status](https://api.travis-ci.org/BurntSushi/same-file.png)](https://travis-ci.org/BurntSushi/same-file)
7 [![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/same-file?svg=true)](https://ci.appveyor.com/project/BurntSushi/same-file)
8 [![](http://meritbadge.herokuapp.com/same-file)](https://crates.io/crates/same-file)
10 Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
12 ### Documentation
14 https://docs.rs/same-file
16 ### Usage
18 Add this to your `Cargo.toml`:
20 ```toml
21 [dependencies]
22 same-file = "1"
23 ```
25 and this to your crate root:
27 ```rust
28 extern crate same_file;
29 ```
31 ### Example
33 The simplest use of this crate is to use the `is_same_file` function, which
34 takes two file paths and returns true if and only if they refer to the same
35 file:
37 ```rust
38 extern crate same_file;
40 use same_file::is_same_file;
42 fn main() {
43     assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
45 ```