Expand description
Utility for reading file ids (Windows) that uniquely identify a file on a single computer.
Modern file systems assign a unique ID to each file.
On Windows it is called a file id or file index.
Together with the device id (Linux, macOS) or the volume serial number (Windows),
a file or directory can be uniquely identified on a single computer at a given time.
Keep in mind though, that IDs may be re-used at some point.
§Example
let file = tempfile::NamedTempFile::new().unwrap();
let file_id = win_file_id::get_file_id(file.path()).unwrap();
println!("{file_id:?}");§Example (Windows Only)
ⓘ
let file = tempfile::NamedTempFile::new().unwrap();
let file_id = win_file_id::get_low_res_file_id(file.path()).unwrap();
println!("{file_id:?}");
let file_id = win_file_id::get_high_res_file_id(file.path()).unwrap();
println!("{file_id:?}");Enums§
- FileId
- Unique identifier of a file
Functions§
- get_
file_ id - Get the
FileIdfor the file or directory atpath - get_
high_ res_ file_ id - Get the
FileIdwith the high resolution variant for the file or directory atpath - get_
low_ res_ file_ id - Get the
FileIdwith the low resolution variant for the file or directory atpath