[TxMt] Re: Why does textmate modify the file mtime after closing the tab?

Allan Odgaard mailinglist at textmate.org
Sun Mar 29 16:04:46 UTC 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macromates.com/textmate/attachments/20200329/a15a32e0/attachment.html>


More information about the TextMate mailing list