• 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: Directory enumeration gives wrong file type for aliases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Directory enumeration gives wrong file type for aliases


  • Subject: Re: Directory enumeration gives wrong file type for aliases
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 08 Oct 2016 11:45:20 -0700

> On Oct 7, 2016, at 5:03 PM, Gabriel Zachmann <email@hidden> wrote:
>
> One thing that surprised me a little, in light of the fact that aliases are completely different from symlinks,
> is that
>  [url getResourceValue: &isAlias forKey: NSURLIsAliasFileKey error: nil]
> yields true for both aliases and symlinks.
> Similarly, the method URLByResolvingAliasFileAtURL: seems to resolve both aliases and symlinks just fine.

It’s just trying to hide the difference between aliases and symlinks, since to a reader they’re equivalent (a file that acts as a pointer to another file.) Similar to how the Finder calls both of them ‘aliases’.

(If you’re curious about why both exist, it’s because aliases date back to System 7 in 1991, ten years before Apple adopted a Unix-based OS. They’re still around because they offer features that symlinks don’t, as well as for backward compatibility. Backward compatibility is also why aliases aren’t traversed semi-automatically by the filesystem the way symlinks are.)

—Jens
_______________________________________________

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: 
 >Directory enumeration gives wrong file type for aliases (From: Gabriel Zachmann <email@hidden>)
 >Re: Directory enumeration gives wrong file type for aliases (From: Quincey Morris <email@hidden>)
 >Re: Directory enumeration gives wrong file type for aliases (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: Re: Help - Epic Browser SPDY Encrypted Proxy Failing in Sierra
  • Next by Date: Re: progress bar not updating
  • Previous by thread: Re: Directory enumeration gives wrong file type for aliases
  • Next by thread: Swift 3 macOS read keyboard
  • Index(es):
    • Date
    • Thread