3 Oct
2010
3 Oct
'10
12:35 a.m.
On Sat, Sep 25, 2010 at 1:36 AM, James Y Knight
An OSX code sketch is available here (summary: call FSPathMakeRef to get an FSRef from a path string, then FSRefMakePath to make it back into a path, which will then have the correct case). And note that it only works if the file actually exists.
http://stackoverflow.com/questions/370186/how-do-i-find-the-correct-case-of-...
It would indeed be useful to have that be available in Python.
There is a much simpler way:
from Carbon import File File.FSRef('/tmp/foo').as_pathname() '/private/tmp/Foo'
Note that this is much slower compared to os.path.exists.