• 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: Why not use path-based API? (was: Loading image resources)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why not use path-based API? (was: Loading image resources)


  • Subject: Re: Why not use path-based API? (was: Loading image resources)
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 14 Sep 2014 08:10:48 -0500

On Sep 14, 2014, at 2:57 AM, Aandi Inston <email@hidden> wrote:

>> No one should be using path-based API any more, generally.
>> You should use URL-based equivalents.
>
> Why? Really, why? Certainly there are APIs where we have to use URL's and
> we have to convert the path into a URL, but where a non-deprecated
> path-based URL exists, what current or future obstacles do you foresee? The
> URL doesn't seem to be more predicable or persistent, for example.
>
> Thanks for any insight. I've been really happy to see the last of the
> old-style colon-separated names and move to something I can understand, a
> pathname.

In addition to what others have said, NSURL can know it represents a file URL and therefore can do smart things like cache file metadata (called resource values in the API).

A string can "look" like a path even when it isn't and it can not look like a path when it is, so NSString can't have any file-specific smarts built into it.

Regards,
Ken


_______________________________________________

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: 
 >Why not use path-based API? (was: Loading image resources) (From: Aandi Inston <email@hidden>)

  • Prev by Date: Questions on Sudden Termination, Automatic Termination, and (User Interface) Resume
  • Next by Date: Re: Loading image resources
  • Previous by thread: Re: Why not use path-based API? (was: Loading image resources)
  • Next by thread: Questions on Sudden Termination, Automatic Termination, and (User Interface) Resume
  • Index(es):
    • Date
    • Thread