• 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: Anybody using NSFileManager here?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anybody using NSFileManager here?


  • Subject: Re: Anybody using NSFileManager here?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 14 Apr 2011 14:15:03 -0700

On Apr 14, 2011, at 13:26, Laurent Daudelin wrote:

> it seems to me that if a file is locked, it's pretty obvious it can't be deleted

Sure it can. Unlock it and delete it.

I'm only half joking here. My point is there are a lot of definitions of deletability:

-- "Ideal" deletability, which we've already decided is an impossible abstraction given different locations (i.e. different file system capabilities, some of which may not even be discoverable by your application) and times (i.e. file attributes changing behind your application's back).

-- The deletability reported by different APIs. NSFileManager may report differently from the low level file manager, which may report differently from POSIX functions. Each is potentially a different deletability.

-- The deletability deducible from the behavior of APIs that actually delete files, depending on whether they succeed of fail. Again, there's potentially a different deletability for each API.

-- The deletability your application wants to report to your users. Since there's no ideal deletability, this falls back to what's useful rather than what's true.

-- The deletability that your application's deletion operation strategy implies. For example, your application might not choose to unlock files for deletion, but an application whose purpose *is* to delete locked files will want to do so.

That's a lot of deletabilities. It's really no use trying to ding 'isDeletableFileAtPath:' for failing to be all of them.

On Apr 14, 2011, at 13:16, Quincey Morris wrote:

> you've already found your technical answer: that 'isDeletableFileAtPath:' isn't the solution to the deletability check you wish to make.

Therefore, I stand by that response.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Anybody using NSFileManager here? (From: Laurent Daudelin <email@hidden>)
 >Re: Anybody using NSFileManager here? (From: Fritz Anderson <email@hidden>)
 >Re: Anybody using NSFileManager here? (From: Laurent Daudelin <email@hidden>)
 >Re: Anybody using NSFileManager here? (From: Mike Abdullah <email@hidden>)
 >Re: Anybody using NSFileManager here? (From: Laurent Daudelin <email@hidden>)
 >Re: Anybody using NSFileManager here? (From: Quincey Morris <email@hidden>)
 >Re: Anybody using NSFileManager here? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: Anybody using NSFileManager here?
  • Next by Date: Adding custom view in IB
  • Previous by thread: Re: Anybody using NSFileManager here?
  • Next by thread: Re: Anybody using NSFileManager here?
  • Index(es):
    • Date
    • Thread