Re: Get executable name & path
Re: Get executable name & path
- Subject: Re: Get executable name & path
- From: Terry Lambert <email@hidden>
- Date: Mon, 02 Mar 2009 10:03:21 -0800
Which will get you the path saved on the stack base for use in getting
the bundle ID.
This is the path that was used to start the executable. And of course
there is no guarantee it dies not contain symbolic links as path
components, nor that the filesystem geomentry has remained constant
since the program was started, so it's entirely possible to substitute
something else in its place, if permissions were not set to prevent
that. This is the problem with after the fact use of paths.
Hopefully the reason he wanted to "skip if it's a link" was not
related to security.
-- Terry
On Mar 2, 2009, at 6:43 AM, Mike Tegtmeyer <email@hidden>
wrote:
_NSGetExecutablePath
See: http://developer.apple.com/samplecode/MoreIsBetter/
Mike
On Mar 2, 2009, at 9:20 AM, Rohitash Panda wrote:
Folks,
Is there a portable way to get the name of the current
executable including the path ?
I need to get the absolute path and also skip if its a link.
Thanks.
--
Rohitash Panda | Database Platform Specific Development
Server Technologies
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden