• 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: Locking
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: option-click hides apps
  • Next by Date: Re: option-click hides apps
  • Previous by thread: Locking
  • Next by thread: Re: Locking
  • Index(es):
    • Date
    • Thread