Crate utime [] [src]

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.

use std::fs::File;
use utime::set_file_times;

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

Functions

get_file_times

Retrieve the timestamps for a file's last modification and access time.

set_file_times

Changes the timestamps for a file's last modification and access time.