https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created how to get created time and print it in the main process instead of in the get_created function ?
fn get_created(path: &str) -> std::io::Result<()> {
let metadata = fs::metadata(path)?;
if let Ok(time) = metadata.created() {
println!("{time:?}");
} else {
println!("Not supported on this platform or filesystem");
}
Ok(())
}
fn main() {
??? get_created ???
}