[TxMt] Atomic Saving / Saving Question
Ryan Schmidt
textmate-2004 at ryandesign.com
Sun Feb 6 22:42:58 UTC 2005
On 01.02.2005, at 11:57, Sune Foldager wrote:
> On 1. feb 2005, at 5:26, Paul Kline wrote:
>
>> What is atomic saving?
>
> Atomic saving makes sure that the old version of the file on disk is
> replaced with the new one in on, atomic, operation. This is sometimes
> needed when the files you are writing might at the same time be read
> by other running programs. Technically it's writing the file with
> another name, then renaming the new file into the old file (destroying
> the old file in the process).
>
> The disadvantage of atomic saves (for some), is that the file gets a
> new inode-number each time which will break hard-links and might upset
> aliases if they are not pointing correctly.
Apple has been promoting this practice for ten years or more, and
aliases have always worked with it in the past. As I understand it,
part of the reason for Apple providing a function to do this is
specifically so that aliases continue to function. The documentation
[1] says that the "file ID" is preserved, though I don't know if that's
the same thing as an "inode number."
[1]
http://developer.apple.com/documentation/Carbon/Reference/File_Manager/
file_manager/function_group_21.html
More information about the textmate
mailing list