How to change the file attribute

69 views
Skip to first unread message

ElvisCheng

unread,
Sep 9, 2016, 3:15:41 AM9/9/16
to OSXFUSE
I'm working on a network file system using OSXFUSE and encountered a problem, I changed the file attribute of "NSFileModificationDate" to the same with my server,but  at this moment some files can not be saved,such as txt rtf format. I wonder how to change the NSFileModificationDate attribute.thanks!

ElvisCheng

unread,
Sep 9, 2016, 5:19:53 AM9/9/16
to OSXFUSE
update it.
when I saved the file,it appear  "the file has been changed by another application" warning?how to solve?

Sam Moffatt

unread,
Sep 10, 2016, 10:26:34 PM9/10/16
to osxfus...@googlegroups.com
Let me understand the flow here:

1) You open a file in TextEdit let’s say.
2) Something updates the modification date in the background
3) When you save the file it says “The file has been changed by another application”

If this is the case, there isn’t much you can do to work around this because as far as the application TextEdit knows the file has changed from underneath it and it’s going to warn that this might be the case. I don’t think there is much you can do if you’re changing the document or it’s attribute while it’s been open with another application. You can actually reproduce this yourself by using TextEdit to save a file, use the command line to “touch” the file and then go back to TextEdit to make some changes. When you try to save this you’ll get the same prompt you’re seeing.

Please let me know if I’ve misread the situation here though, this is a bit of a stab in the dark.

Cheers,

Sam


--
You received this message because you are subscribed to the Google Groups "OSXFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-group+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ElvisCheng

unread,
Sep 19, 2016, 3:02:03 AM9/19/16
to OSXFUSE
hi Sam,
I'm working on a network file system using OSXFUSE,the text file is on the server, I changed the file attribute "NSFileModificationDate" to the time of uploading server,not with local cache. when I open the file and edit/save two times, It will appear the warning, so far I have not much to do for this.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages