Re: bundlePath, FSPathMakeRef and FSGetCatalogInfo alias error
Re: bundlePath, FSPathMakeRef and FSGetCatalogInfo alias error
- Subject: Re: bundlePath, FSPathMakeRef and FSGetCatalogInfo alias error
- From: Bob Ippolito <email@hidden>
- Date: Wed, 23 Jun 2004 13:03:42 -0400
On Jun 23, 2004, at 12:03 PM, Emmanuel Verlynde wrote:
>
I need to obtain volume reference of device from wich application is
>
started.
>
>
If application is started from a cdrom drive, path appears like this:
>
>
NSString * appPath = [[NSBundle mainBundle] bundlePath];
>
appPath <<< "/Volumes/MacMagCD"
>
>
But, how FSPathMakeRef can determine good reference if two volumes
>
have the
>
same name?
>
>
example two identical compact disc into two cd-rom drive.
>
>
/Volumes/MacMagCD <<< cd-rom drive 1
>
/Volumes/MacMagCD <<< cd-rom drive 2
That never happens. Paths are unique. The second CD-ROM inserted
would have a path of @"/Volumes/MacMagCD 1". So, of course, the mount
point (path) is not a reliable way to determine the volume name of a
drive, but you can pass that path to LaunchServices (maybe NSWorkspace
has an API for it) to find the display name -- which I think should be
the volume name.
-bob
[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.