Re: Locking
Re: Locking
- Subject: Re: Locking
- From: Wade Tregaskis <email@hidden>
- Date: Wed, 16 Jun 2004 10:43:30 +1000
I have an application which does
[ fileManager removeFileAtPath: aPath handler: self ]
When "aPath" is in use by Xcode this fails.
But Finder tells me that "aPath" is not locked.
So: how does Xcode prevent the removal of "aPath" ?
The 'Locked' attribute is distinct from being in use. XCode presumably
has the file open, possibly with exclusive access... I'm not sure what
is necessary to prevent deletion, i.e. whether just having it open for
non-exclusive reading will be enough.
FWIW, it's possibly a bug that the file is kept open... unless you're
planning to access the file in the very near future, and/or regularly,
you should generally always close them to prevent these kinds of
problems. I've noticed XCode is pretty bad with this, although it's
far from the only one.
Wade Tregaskis (aim: wadetregaskis)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Locking (From: "Gerriet M. Denkmann" <email@hidden>) |