Node - fs.stat birthtimeMs and mtimeMs

喜你入骨 提交于 2019-12-11 07:58:33

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!