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