• 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: Reconizing a symbolic or alias directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reconizing a symbolic or alias directory


  • Subject: Re: Reconizing a symbolic or alias directory
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 29 May 2002 13:19:31 +0200

On Wednesday, May 29, 2002, at 09:18 , Nathan Zamecnik wrote:

It comes across a symbolic directory (AKA alias directory) it doesn't
reconize it as a directory and does not step into it to read its contents
like it would a regular directory. I am using a NSFileManager for this
class as to do most of the file traversing. Any idea on how to make a
NSFileManager reconize a symbolic directory and then traverse it?

Only one clean way: wait till Apple implements aliases properly.

Till that, aliases are *not* accessible through any standard API(*); if you want to support them, you have to do it manually and go Carbon for that.

(*) Actually, AppKit level usually takes care of that: if you access a file through open panel or NSDocument suite, aliases are resolved properly even before you get the path. With the standard file management though, be it Foundation or BSD, you are out of luck.

My solution is warn users that in some situations aliases don't work, and if they complain, they should complain at Apple to fix the thing at the filesystem level (preferrably by making alias/softlink twins, which would be easily possible thanks to the fact alias is pure resource fork, whilst softlink is pure data fork. If interested, search archives -- someone suggested this excellent solution with many details I don't recall just now). If you can't afford it, Carbon is the way you must go.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Reconizing a symbolic or alias directory
      • From: Nathan Zamecnik <email@hidden>
References: 
 >Reconizing a symbolic or alias directory (From: Nathan Zamecnik <email@hidden>)

  • Prev by Date: Re: Frontmost window of particular document type
  • Next by Date: Re: max size of [NSString stringWithContentsOfFile:] ?
  • Previous by thread: Reconizing a symbolic or alias directory
  • Next by thread: Re: Reconizing a symbolic or alias directory
  • Index(es):
    • Date
    • Thread