Re: Getting Application Path
Re: Getting Application Path
- Subject: Re: Getting Application Path
- From: David Remahl <email@hidden>
- Date: Thu, 29 May 2003 12:19:22 +0200
Or, the carbon way, something like this:
NSString path ->
NSURL ->
CFURLGetFSRef() ->
FSRef ->
FSGetCatalogInfo() with a FSCatalogInfoBitmap with kFSCatInfoVolume set
->
FSCatalogInfo->volume ->
FSGetVolumeInfo() ->
HFSUniStr255 ->
NSString
:-) Not quite as fun, but implemented in a category it could be reused
easier than iterating over the mountedLocalVolumePaths, comparing path
prefixes. Reused - that is - until Apple decides to drop Carbon or move
to a platform that doesn't support it.
/ David
On torsdag, maj 29, 2003, at 11:45 Europe/Stockholm, j o a r wrote:
What if you were to compare that path with what is returned from:
"AppKit > NSWorkspace > mountedLocalVolumePaths"?
j o a r
On Thursday, May 29, 2003, at 11:16 Europe/Stockholm, Anthony Cheung
wrote:
I have no problem to get my application path. However, is it possible
to get
the volume name of the application as well. Many Thanks.
_______________________________________________
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.