Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Back up your Contacts database automatically ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Back up your Contacts database automatically
Authored by: beepotato on Mar 12, '13 05:52:55AM

That functionality predates Mac OS X. I don't know if it was introduced with HFS+ (Mac OS 8) or if it was already present in HFS (in 1987).

So, it has been present in Mac OS X since version 10.0.

If you don't have the man page on your machine, it's probably the you have not installed the developer tools (or have not installed all the documentation). Anyway, the man page can be found online:

https://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man2/exchangedata.2.html


They chose to look at OS X, and found many surprises - including the heavy use of "rename", which they tracked back to the "copy and rename" behavior of many common Mac applications. It looks as if Apple has added a call to provide support for this style of update, though how widely it's used at this point, I don't know.

It is widely used, mainly because the NSDocument class uses it by default when saving. So all the NSDocument-based applications get it for free.

However, NSDocument used to do it "the old way" (through "rename") in early versions of Mac OS X (probably inheriting it from NeXTStep). I remember reading release notes for whichever version of Cocoa describing the move to rely on the HFS data swapping functionality (which, until then, was used mostly by Carbon-based applications).

Depending on when that study of filesystem usage was done, the above may explain the heavy use of "rename" in Mac OS X. It is probably used a lot less now.



[ Reply to This | # ]