set_changed_date

Function set_changed_date 

Source
pub fn set_changed_date(file: &Path, create: &FileTime) -> bool
Expand description

Set the modified date of a file.

§Params

file: &Path -> The path of the file to change.
create: &FileTime -> The new file time for a file.

§Returns

bool -> True if successful, false if not.
False means that the file could not be found or modified. Check to makesure the path is correct.

§Examples

use system_extensions::metadata::time::{set_changed_date, FileTime};
use std::path::Path;

set_changed_date(Path::new("/test.txt"), &FileTime::new(25, 12, 2021));