• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: File saving -- how is it done?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File saving -- how is it done?


  • Subject: Re: File saving -- how is it done?
  • From: Laurence Harris <email@hidden>
  • Date: Thu, 26 Apr 2007 17:17:12 -0400


On Apr 26, 2007, at 5:00 PM, Ian Archer wrote:

I've noticed that some mac applications do file saves through what
appears to be a write'n'swap system.  One can observe something like:

/Users/name/.TemporaryItems/folders.501/TemporaryItems/(A Document
Being Saved By OmniGraffle)/test.graffle

Although at least TextEdit and probably many others do this.  My
assumption is that there is some function call or series of function
calls which accomplish this.  I can't tell whether this file is
written to, then replaced with the destination file, or whether this
is some hard link that is written to.

I am curious:
a) what is the high level call (if any) which generates this outcome
b) what are the low level commands which implement this functionality.

Thanks for any help you can provide!

If you're using Carbon File Manager APIs, you can use FSExchangeObjects on volumes that support it. I don't know if Cocoa has an equivalent. I think a lot of software just does the obvious thing: write to a file with a temporary name, delete the old file, rename the new file.


carbon-dev and cocoa-dev, depending on what you're using, would be better for questions like this as they have a lot more people subscribed to them. I think this list is more for people doing file- system related development. This is the first posting I've seen here in months.

Larry

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: File saving -- how is it done?
      • From: Dominic Giampaolo <email@hidden>
References: 
 >File saving -- how is it done? (From: "Ian Archer" <email@hidden>)

  • Prev by Date: File saving -- how is it done?
  • Next by Date: Re: File saving -- how is it done?
  • Previous by thread: File saving -- how is it done?
  • Next by thread: Re: File saving -- how is it done?
  • Index(es):
    • Date
    • Thread