• 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: Mike Abdullah <email@hidden>
  • Date: Thu, 14 Apr 2011 19:38:49 +0100

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

> On Apr 14, 2011, at 11:18, Fritz Anderson wrote:
>
>> On 14 Apr 2011, at 12:51 PM, Laurent Daudelin wrote:
>>
> Is it normal that NSFileManager's isDeletableFileAtPath: returns YES for a locked file? Based on the result it returns, when I try to send it a removeItemAtPath:error:, it fails and the error localized description is '“This is a test.docx” couldn’t be removed because you don’t have permission to access it.'. That seems wrong to me. First, isDeletableFileAtPath: shouldn't return YES for a locked file.
>
> Not a big problem. I can check if it's writable at path and if it's not, then I know the delete won't work but I was wondering if this was the expected behavior for NSFileManager isDeletableFileAtPath: ...

In general, Apple recommends that you go ahead and attempt an operation, handling any failure, rather than try to see if it will succeed ahead of time. For many operations/file systems/failures, it is not even possible to guess at the result without trying the op._______________________________________________

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

  • Follow-Ups:
    • Re: Anybody using NSFileManager here?
      • From: Laurent Daudelin <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>)

  • Prev by Date: Re: isDeletableFileAtPath: returns YES for locked files???
  • Next by Date: Re: Anybody using NSFileManager here?
  • Previous by thread: Re: Anybody using NSFileManager here?
  • Next by thread: Re: Anybody using NSFileManager here?
  • Index(es):
    • Date
    • Thread