19
Jul 2008

Slash in path name of Mac OS X

Some interesting facts about slash and path name in Mac OS X:
  1. In Finder, you can create/rename a folder with slash in it's name.
  2. Internally, it stores slash as colon.
  3. So you can see slash is actually a colon in Terminal
  4. But, you cannot create a folder with colon in it's name in Finder

So, when it comes to script/programming, it's more tricky. I was scripting with JavaScript/InDesign, the facts about this combination are:
  1. Read a path name with slash(which is slash in Finder, and colon in Terminal) in it, you get a string with colon
  2. To create a folder with slash and colon in it's path, Folder.create method will fail
  3. Folder.create method just does not allow colon in it's path.
  4. Finally I cannot figure out how to create a folder with slash(which is colon actually) in it's name.
comments powered by Disqus