blob: 2a114b9a460f3205d46138f9cfadc520593dfe2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
same-file
=========
A safe and simple **cross platform** crate to determine whether two files or
directories are the same.
[![Linux build status](https://api.travis-ci.org/BurntSushi/same-file.png)](https://travis-ci.org/BurntSushi/same-file)
[![Windows build status](https://ci.appveyor.com/api/projects/status/github/BurntSushi/same-file?svg=true)](https://ci.appveyor.com/project/BurntSushi/same-file)
[![](http://meritbadge.herokuapp.com/same-file)](https://crates.io/crates/same-file)
Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
### Documentation
https://docs.rs/same-file
### Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
same-file = "1"
```
and this to your crate root:
```rust
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:
```rust
extern crate same_file;
use same_file::is_same_file;
fn main() {
assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
}
```
|