• 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: How to check if file exists?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if file exists?


  • Subject: Re: How to check if file exists?
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 10 May 2014 14:32:49 -0700

On May 10, 2014, at 1:27 PM, Charles Srstka <email@hidden> wrote:
>
>> On May 10, 2014, at 2:25 PM, Quincey Morris <email@hidden> wrote:
>>
>> -[NSFileManager fileExistsAtPath:] is pretty much legacy API nowadays (and it’s significant that there’s no URL-based version of it).
>
> Sure there is; -[NSURL checkResourceIsReachableAndReturnError:].


True enough. However, from the documentation for that method:

> If your app must perform operations on the file, such as opening it or copying resource properties, it is more efficient to attempt the operation and handle any failure that may occur.

I think the word “efficient” ought to be replaced with “correct” in that sentence.

--Kyle Sluder
_______________________________________________

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: How to check if file exists?
      • From: Charles Srstka <email@hidden>
References: 
 >How to check if file exists? (From: William Squires <email@hidden>)
 >Re: How to check if file exists? (From: Quincey Morris <email@hidden>)
 >Re: How to check if file exists? (From: Charles Srstka <email@hidden>)

  • Prev by Date: Re: How to check if file exists?
  • Next by Date: Re: How to check if file exists?
  • Previous by thread: Re: How to check if file exists?
  • Next by thread: Re: How to check if file exists?
  • Index(es):
    • Date
    • Thread