• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..15-Mar-2021-

examples/H15-Mar-2021-4837

src/H15-Mar-2021-854389

.cargo-checksum.jsonH A D15-Mar-2021832 11

COPYINGH A D15-Mar-20211.5 KiB2824

Cargo.tomlH A D15-Mar-20211.1 KiB2927

README.mdH A D15-Mar-20211 KiB4631

appveyor.ymlH A D15-Mar-2021536 2319

README.md

1same-file
2=========
3A safe and simple **cross platform** crate to determine whether two files or
4directories are the same.
5
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)
9
10Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
11
12### Documentation
13
14https://docs.rs/same-file
15
16### Usage
17
18Add this to your `Cargo.toml`:
19
20```toml
21[dependencies]
22same-file = "1"
23```
24
25and this to your crate root:
26
27```rust
28extern crate same_file;
29```
30
31### Example
32
33The simplest use of this crate is to use the `is_same_file` function, which
34takes two file paths and returns true if and only if they refer to the same
35file:
36
37```rust
38extern crate same_file;
39
40use same_file::is_same_file;
41
42fn main() {
43    assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
44}
45```
46