2 ms·
It's been a while since I worked on this, but if I recall correctly...here's an example: Some Windows apps save by (1) writing a new file, (2) deleting the old
by wrs 16y ago
It's been a while since I worked on this, but if I recall correctly...here's an example: Some Windows apps save by (1) writing a new file, (2) deleting the old file, (3) renaming new to old. The idea is that if it dies in the middle, you don't end up with no complete files. This sequence of events is actually recognized in the Windows filesystem code (if it happens quickly enough) and turned into a file-replace operation, which has very different semantics, particularly the effect of copying the metadata (think extended attributes) from old to new.
Actually the whole question of what to do with "advanced" filesystem semantics (like extended attributes) is pretty hard, especially if you're trying to sync across platforms where those semantics differ. You could just ignore them, but then if an app actually uses them (and why else would they exist?) then the file won't round-trip through the sync platform.
- huhtenberg 16y ago> This sequence of events is actually recognized in the Windows filesystem code.. and turned into a file-replace operation Woah. I have quite a bit of experience digging through the crap in Windows kernel, but this seems to top all of that. Do you happen to have any references? MSDN, some forum threads, anything? Frankly I just find it hard to believe.
- wrs 16y agoThis is documented now, at least for creation times, short names, and file IDs. Apparently the filesystem can choose what to "tunnel" across the delete+rename. http://support.microsoft.com/kb/172190 http://support.microsoft.com/kb/172190 http://www.osronline.com/article.cfm?id=22 http://www.osronline.com/article.cfm?id=22 History: http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/439261.aspx http://blogs.msdn.com/b/oldnewthing/archive/2005/07/15/43926...
- huhtenberg 16y agoReading... thanks.