|
From: | Kevin Horton |
Subject: | Re: [rdiff-backup-users] What filename characters does Mac OS X support? |
Date: | Thu, 20 Oct 2005 22:51:14 -0400 |
On 20 Oct 2005, at 21:26, Ben Escoto wrote:
I'm trying to make rdiff-backup a little friendlier on Mac OS X now. Does anyone know offhand what characters are allowable in a Mac OS X filename? I'm asking because I need to figure out exactly when we don't need to quote characters. As long as the source directory is non-empty (and has a filename that has a letter in it), then we can tell whether that directory is case-sensitive. But it's harder to tell whether or not a source (and thus read-only) directory supports characters like a colon or a backslash. So if Mac OS X supports everything except case sensitivity (and '/', and NULL). But if there is other support missing things could become more complicated.
At the GUI level, it seems that OS X allows any character except a colon and NULL. "/" characters are legal, but the GUI translates them to ":" behind the scenes at the unix level. So a file named "crazy/name.txt" at the GUI level is actually named "crazy:name.txt" at the unix level.
This strange system of translating "/" to ":" is due to the fact that OS 9 and earlier used ":" as the path specifier - the equivalent of "/" in unix, or "\" in DOS. "/" was legal in filenames in OS 9. When OS X came along, they needed a way to handle users who had legacy files with a "/" in them, so they came up with this scheme to translate them to ":".
At the unix level where rdiff-backup works, every character appears to be legal except "/" and NULL.
The above info is based on what the OS X Help system says, and what I can find on Google. It is not guaranteed to be 100% complete, but I am 99.9% sure it is good info.
http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh552.htmlhttp://lists.seas.upenn.edu/pipermail/unison-hackers/2005-March/ 000006.html
Kevin Horton Ottawa, Canada
[Prev in Thread] | Current Thread | [Next in Thread] |