Most likely though electron-vue would use kqueue() or FSEvents to just detect that “something changed” in the directory and not actually look at file modification dates to verify that file data has actually changed.
Thank you! I found that electron-vue dependencies include fsevent.
------------------ 原始邮件 ------------------ 发件人: "Allan Odgaard"<mailinglist@textmate.org>; 发送时间: 2020年3月30日(星期一) 凌晨0:04 收件人: "TextMate users"<textmate@lists.macromates.com>;
主题: [TxMt] Re: Why does textmate modify the file mtime after closing the tab?
On 29 Mar 2020, at 22:22, Marc Wilson wrote:
I'm not saying you're wrong (I have no idea), but Howard says:
"Changing a file’s xattrs doesn’t alter the data in the file itself. Xattrs aren’t even stored in the main data area of a volume, but apart, in the file system metadata. So adding or changing a xattr won’t change the date of modification, nor the date that the file was last opened.
This is true, however, there is also a “time of last file status change” which does change when extended attributes are updated.
Most likely though electron-vue would use kqueue() or FSEvents to just detect that “something changed” in the directory and not actually look at file modification dates to verify that file data has actually changed.
I'm wondering how to test something like that. :)
Here’s a test: % stat test.txt|grep Change Change: 2020-03-29 22:55:57.799348845 +0700 % xattr -w foo bar test.txt % stat test.txt|grep Change Change: 2020-03-29 23:02:02.450048038 +0700