• 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: cocoa file paths, / or :
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cocoa file paths, / or :


  • Subject: Re: cocoa file paths, / or :
  • From: Kurt Revis <email@hidden>
  • Date: Sun, 3 Mar 2002 11:19:51 -0800

P.S. I understand that Darwin sees the "/", but isn't Darwin being lied to? I seem to recall that HFS uses ":" as its file delimiter. I recall (and I may be mistaken), that the delimiter is ":", Darwin is fooled into thinking it's "/", and then the user is supposed to be presented with ":" again.

It's my understanding that there is no "native" path separator in the file system. HFS/HFS+ doesn't actually store full paths, with ':' or '/' in them, anywhere. (Someone correct me if I'm wrong here.) However, HFS/HFS+ does disallow the ':' character in filenames. There are some File Manager calls in the old Mac OS (now in Carbon) which let the programmer work with full paths, delimited by ':', but those aren't really "part of the filesystem" (although this may be splitting hairs).

I can't find the original email right now, but I recall reading that there are multiple places where ';' gets changed to '/', and vice versa. It's not nearly as elegant as one might expect, but it works.

You might also see this paper:
http://www.mit.edu/people/wsanchez/papers/USENIX_2000/
which details the different layers a little.

As far as what to show the user: Currently even Apple's programs do it both ways. Obviously the Finder uses colons, but in the System Preferences (the Internet icon, "Web" tab) paths are shown with slashes. Yes, this is sort of lame. I don't really know if there is a push to reconcile it or not. You might ask on the Apple-HI-Developers mailing list (or check its archives), where I have no doubt that lots of blood has been spilled over this issue.

How's that for definitive?

--
Kurt Revis
email@hidden
_______________________________________________
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.

  • Prev by Date: Re: Delegate for Double Click in NSTableView
  • Next by Date: Re: More memory management questions
  • Previous by thread: Re: Delegate for Double Click in NSTableView
  • Next by thread: Table Views
  • Index(es):
    • Date
    • Thread