site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry _NSGetExecutablePath See: http://developer.apple.com/samplecode/MoreIsBetter/ Mike On Mar 2, 2009, at 9:20 AM, Rohitash Panda wrote: 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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. On Mar 2, 2009, at 6:43 AM, Mike Tegtmeyer <tegtmeye@eecis.udel.edu> 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert