3 A safe and cross platform crate to determine whether two files or directories
6 [![Build status](https://github.com/BurntSushi/same-file/workflows/ci/badge.svg)](https://github.com/BurntSushi/same-file/actions)
7 [![](http://meritbadge.herokuapp.com/same-file)](https://crates.io/crates/same-file)
9 Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
13 https://docs.rs/same-file
17 Add this to your `Cargo.toml`:
26 The simplest use of this crate is to use the `is_same_file` function, which
27 takes two file paths and returns true if and only if they refer to the same
31 use same_file::is_same_file;
34 assert!(is_same_file("/bin/sh", "/usr/bin/sh").unwrap());
38 ### Minimum Rust version policy
40 This crate's minimum supported `rustc` version is `1.34.0`.
42 The current policy is that the minimum Rust version required to use this crate
43 can be increased in minor version updates. For example, if `crate 1.0` requires
44 Rust 1.20.0, then `crate 1.0.z` for all values of `z` will also require Rust
45 1.20.0 or newer. However, `crate 1.y` for `y > 0` may require a newer minimum
48 In general, this crate will be conservative with respect to the minimum
49 supported version of Rust.