fs::Metadata bug?

#1

I noticed today, when compiling some code that uses std::fs::Metadata, that i get an exception when calling created() on cent 6 and 7:
StringError(“creation time is not available on this platform currently”).

But that cant be correct. I can get access and modify times using their corresponding methods. And i can call ctime no problem.

let ct = std::fs::metadata("./main.fs")?.created();
println!("{:?}", ct);

fails.
Works fine on os x.

0 Likes

#2

ctime is not “created time”. It’s “changed time”. Linux doesn’t keep track of created time.

0 Likes

#3

Ah. Well. That explains matters. That’s what i get for assuming.

0 Likes