Re: Getting Application Path
Re: Getting Application Path
- Subject: Re: Getting Application Path
- From: Tim Hewett <email@hidden>
- Date: Thu, 29 May 2003 16:08:34 +0100
Anthony,
Once you get the application path using the NSBundle method
shown by Rolf, you can pass the path into the statfs() Unix system
call. This will fill in a struct statfs buffer, and along with all the
other
filesystem information you will be given the mount point of the
volume containing the file you passed in. This is the info which
you are looking for. See "man statfs" in Terminal for more info.
Also there is another way to get the application path: the following
line produces a NSString value containing the path.
[[[NSWorkspace sharedWorkspace] activeApplication]
objectForKey:@"NSApplicationPath"]
Tim.
On Thursday, May 29, 2003, at 14:57 Europe/London,
email@hidden wrote:
Dear all,
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.
Regards,
Anthony
_______________________________________________
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.