Re: CFStringCreateWithCharacters and unicode ":" chars
Re: CFStringCreateWithCharacters and unicode ":" chars
- Subject: Re: CFStringCreateWithCharacters and unicode ":" chars
- From: Clark Cox <email@hidden>
- Date: Tue, 11 May 2004 16:36:42 -0400
On May 11, 2004, at 14:47, Ken Hawkins wrote:
>
on a bit more inspection it appears the FSGetVolumeInfo(...) is not
>
correctly inpterpreting the ':' in the volume name.
It is correctly interpreting it. ':' cannot appear in HFS paths, while
'/' cannot appear in POSIX paths. The system simply treats them both in
the same manner (i.e. for applications dealing with FSRefs and HFS
routines, that character is represented as '/', while for applications
dealing with POSIX paths, that character is represented as ':').
For instance, if you type:
mkdir "asdf:fdsa"
on the command line, apps using POSIX paths will see that as a
directory named "asdf:fdsa". However, apps using HFS paths (such as the
Finder) will see the directory as being named "asdf/fdsa".
>
since this is an apparent hold over for mac is there a newer call to
>
accomplish retrieving all the Volumes on a machine other than this
>
call?
FSGetVolumeInfo() is not an old routine (i.e. it is not a holdover
from the FSSpec days).
>
>
i guess i could loop through everything on /Volumes and look for aiff
>
files to determine if it is an audio CD or not but i was hopeful that
>
there is a more elegant way...
Maybe I missed something, but if all you're trying to do is determine
the type of volume, why do you care about the name? If you need the
volume name to pass to filesystem functions, then the munging is there
for your own good. If you need the name to display to the user, then
you should get an FSRef for the volume (i.e. use the last parameter of
FSGetVolumeInfo), and pass that to LSCopyDisplayNameForRef.
--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.