Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is OS still working with files after an FSExchangeObjects call?



Hmm, try searching the archives on "fBsyErr".  There's been some
discussion already on how to avoid fBsyErr "created" by Spotlight
indexing.  Even if  it's not Spotlight causing you grief it might be a
good thing to read.

hth,
Cheers,
-H.

On 01/08/07, Tolu Fapohunda <email@hidden> wrote:
> Hello,
>
> I am trying to implement a "save" mechanism.  I want the "save" mechanism to
> be safe (I dont want to corrupt the user's data) - so, I create a temporary
> file, write to the temporary file, swap the contents of the temporary file
> with the real file the user saved to, then delete the temporary file.
>
> Now, I am swapping the contents of 2 files using FSExchangeObjects(...).
> FSExchangeObjects returns no error, however, sometimes when I try to delete
> the unwanted (temp) file, I get a fBsyErr [File is busy (delete)].  Is the
> OS still doing something with the file(s) after they are exchanged?  This
> seems to happen once every 3 times I call FSExchangeObjects.
>
> Both files are guaranteed to always in the same directory. Any advice
> appreciated?
>
> Thanks in advance,
> Tolu
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Carbon-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/carbon-dev/email@hidden
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Is OS still working with files after an FSExchangeObjects call? (From: "Tolu Fapohunda" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.