Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 15-Mar-2021 | - | ||||
examples/ | H | 15-Mar-2021 | - | 48 | 37 | |
src/ | H | 15-Mar-2021 | - | 854 | 389 | |
.cargo-checksum.json | H A D | 15-Mar-2021 | 832 | 1 | 1 | |
COPYING | H A D | 15-Mar-2021 | 1.5 KiB | 28 | 24 | |
Cargo.toml | H A D | 15-Mar-2021 | 1.1 KiB | 29 | 27 | |
README.md | H A D | 15-Mar-2021 | 1 KiB | 46 | 31 | |
appveyor.yml | H A D | 15-Mar-2021 | 536 | 23 | 19 |
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