41 releases

0.2.25 Aug 27, 2024
0.2.23 Dec 5, 2023
0.2.22 Aug 5, 2023
0.2.21 Apr 5, 2023
0.1.5 Jul 29, 2015

#12 in Filesystem

Download history 988759/week @ 2024-08-23 964107/week @ 2024-08-30 1025432/week @ 2024-09-06 923940/week @ 2024-09-13 1017501/week @ 2024-09-20 1004584/week @ 2024-09-27 1066662/week @ 2024-10-04 1050946/week @ 2024-10-11 1097424/week @ 2024-10-18 1118137/week @ 2024-10-25 1050458/week @ 2024-11-01 1100801/week @ 2024-11-08 1136293/week @ 2024-11-15 1019372/week @ 2024-11-22 1066238/week @ 2024-11-29 987530/week @ 2024-12-06

4,423,356 downloads per month
Used in 4,688 crates (263 directly)

MIT/Apache

55KB
1K SLoC

filetime

Documentation

A helper library for inspecting and setting the various timestamps of files in Rust. This library takes into account cross-platform differences in terms of where the timestamps are located, what they are called, and how to convert them into a platform-independent representation.

# Cargo.toml
[dependencies]
filetime = "0.2"

Advantages over using std::fs::Metadata

This library includes the ability to set this data, which std does not.

This library, when built with RUSTFLAGS=--cfg emulate_second_only_system set, will return all times rounded down to the second. This emulates the behavior of some file systems, mostly HFS, allowing debugging on other hardware.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Filetime by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–7.5MB
~58K SLoC