问题
One of the properties of the fs.Stats
object that is returned when one calls fs.stat
is birthtime
and birthtimeMs
, which I'm assuming is when the file was created.
Stats {
dev: 2114,
ino: 48064969,
mode: 33188,
nlink: 1,
uid: 85,
gid: 100,
rdev: 0,
size: 527,
blksize: 4096,
blocks: 8,
atimeMs: 1318289051000.1,
mtimeMs: 1318289051000.1,
ctimeMs: 1318289051000.1,
birthtimeMs: 1318289051000.1, // this value
atime: Mon, 10 Oct 2011 23:24:11 GMT,
mtime: Mon, 10 Oct 2011 23:24:11 GMT,
ctime: Mon, 10 Oct 2011 23:24:11 GMT,
birthtime: Mon, 10 Oct 2011 23:24:11 GMT } // and this value all the way down here
I'm wondering whether or not birthtime
and birthtimeMs
is used and reliably returned in UNIX or Linux and MacOS environments?
来源:https://stackoverflow.com/questions/58263078/fs-stat-birthtime-birthtimems-in-linux-and-macos