9 releases

✓ Uses Rust 2018 edition

0.3.0 May 21, 2020
0.2.2 Sep 27, 2018
0.2.0 Jan 8, 2017
0.1.3 Jul 28, 2015
0.0.1 Jul 28, 2015

#51 in Filesystem

Download history 3545/week @ 2020-02-09 2455/week @ 2020-02-16 5803/week @ 2020-02-23 4151/week @ 2020-03-01 3722/week @ 2020-03-08 3059/week @ 2020-03-15 1996/week @ 2020-03-22 1885/week @ 2020-03-29 1331/week @ 2020-04-05 1332/week @ 2020-04-12 967/week @ 2020-04-19 2613/week @ 2020-04-26 2539/week @ 2020-05-03 2086/week @ 2020-05-10 3203/week @ 2020-05-17 2068/week @ 2020-05-24

11,404 downloads per month
Used in 3 crates

Apache-2.0 OR MIT

9KB
108 lines

utime

A missing utime function for Rust.

Standard library of Rust doesn't provide stable way to set atime/mtime of a file. This crate provides stable way to change a file's last modification and access time.

[dependencies]
utime = "0.2"
use std::fs::File;
use utime::*;

File::create("target/testdummy").unwrap();
set_file_times("target/testdummy", 1000000, 1000000000).unwrap();

let (accessed, modified) = get_file_times("target/testdummy").unwrap();
assert_eq!(accessed, 1000000);
assert_eq!(modified, 1000000000);


utime is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0). See COPYRIGHT for details.

Dependencies

~43KB