Sunbeam Studios

Our open-source projects, here for you!

filetime (0.2.27)

Published 2026-03-26 10:57:58 +00:00 by siennathesane

Installation

[registry]
default = "gitea"

[registries.gitea]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add filetime@0.2.27

About this package

Platform-agnostic accessors of timestamps in File metadata

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

ID Version
cfg-if ^1.0.0
tempfile ^3
libredox ^0.1.0
libc ^0.2.27

Keywords

timestamp mtime
Details
Cargo
2026-03-26 10:57:58 +00:00
0
Alex Crichton <alex@alexcrichton.com>
MIT/Apache-2.0
16 KiB
Assets (1)
Versions (1) View all
0.2.27 2026-03-26