Registry / utility / same-file

same-file

JSON →
library1.0.6rscratesunverified

A simple crate for determining whether two file paths point to the same file.

# Cargo.toml [dependencies] same-file = "1.0.6"
INSTALL
IMPORT
SIG · SAME-FILE
S
same-file
utilityrustv1.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

is_same_file
use same_file::is_same_file;

Checks if two paths refer to the same file.

use same_file::is_same_file; fn main() { let a = std::path::Path::new("/tmp/a.txt"); let b = std::path::Path::new("/tmp/b.txt"); match is_same_file(a, b) { Ok(true) => println!("Same file"), Ok(false) => println!("Different files"), Err(e) => eprintln!("Error: {}", e), } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.6latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
same-file — cargo add same-file · libregistry