问题
I have created an empty file on filesystem (NTFS) in Windows. I called fs.stat
on it and realized that birthtimeMs and mtimeMs are equal.
This is good for my case, because I need to detect whether someone has not changed the file somehow in the meantime.
So on Windows NTFS I can do birthdateMs === mTimeMs
and if it evaluates to true, I can say that file was not touched by anyone else.
The question is whether I can rely on this on Windows FAT and Mac filesystem too.
I know I can try it, but it's easier to ask whether some documentation refers to it or someone else has tried this before.
来源:https://stackoverflow.com/questions/56280115/node-fs-stat-birthtimems-and-mtimems