#windows-file #windows #timestamp #filetime #winapi #set-file-time #btime

filetime_creation

An enhanced version of filetime, which can set file creation time on Windows before Rust 1.75

9 releases

0.2.0 Jan 26, 2024
0.1.7 Jan 25, 2024
0.1.6 Aug 8, 2023
0.1.5 Apr 5, 2023
0.1.0 Aug 28, 2022

#30 in Windows APIs

Download history 5214/week @ 2024-02-15 4891/week @ 2024-02-22 3905/week @ 2024-02-29 3840/week @ 2024-03-07 4075/week @ 2024-03-14 5676/week @ 2024-03-21 4147/week @ 2024-03-28 3185/week @ 2024-04-04 3221/week @ 2024-04-11 2758/week @ 2024-04-18 2998/week @ 2024-04-25 2838/week @ 2024-05-02 2900/week @ 2024-05-09 3008/week @ 2024-05-16 3016/week @ 2024-05-23 2644/week @ 2024-05-30

11,948 downloads per month
Used in 20 crates (3 directly)

MIT/Apache

26KB
442 lines

filetime_creation

Notice:

Rust 1.75 stabilized std::fs::File::set_times and FileTimesExt trait. This means that if you use Rust 1.75 and above, or your library's MSRV allows the use of 1.75 and above, you no longer need to use this crate, and we recommend that you use the standard library directly.

But if you are unable to use Rust 1.75 and above for some reason, then you still need to use this crate as a workaround.

Documentation

An enhanced version of filetime, which can set file creation time on Windows.

Internally, this use SetFileTime Win32 API to set the file creation time on Windows.

On other platforms, all functions will just call the corresponding filetime's function, and ignore the file creation time.

# Cargo.toml
[dependencies]
filetime_creation = "0.1"

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_creation by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–8.5MB
~67K SLoC