Skip to content

Pascalio/utime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

utime crates-i travis-i appveyor-i

A missing utime function for Rust. Documentation

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.1"
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);

BSD 2-Clause

About

⏰ A missing utime function for Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%