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

Re: Fast NSArray compare


  • Subject: Re: Fast NSArray compare
  • From: Charles Srstka <email@hidden>
  • Date: Tue, 15 Apr 2014 16:56:08 -0500

On Apr 14, 2014, at 9:01 PM, Ken Thomases <email@hidden> wrote:

> You should obtain the resource identifier object of each URL using -getResourceValue:forKey:error: with NSURLFileResourceIdentifierKey, then compare those two objects using -isEqual:.

One thing to watch out for, though: the object returned for NSURLFileResourceIdentifierKey returns YES for isEqual: if the two objects have the same inode. This means that if you have two files that are hard links of the same inode, it will report them as equal. If you want to check if two URLs point to the same catalog node rather than to the same inode, you'll need to do something else.

Charles

_______________________________________________

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: 
 >Fast NSArray compare (From: Varun Chandramohan <email@hidden>)
 >Re: Fast NSArray compare (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Fast NSArray compare
  • Next by Date: Re: Fast NSArray compare
  • Previous by thread: Re: Fast NSArray compare
  • Next by thread: Re: Fast NSArray compare
  • Index(es):
    • Date
    • Thread