Let's say I've got two OSX Mach-O apps and app A has the ability to
launch app B. Given a path to app B, how do I determine if it exists?
Clearly, you have to append ".app" to the filename in order to find it
in the first place but file system routines tell me that this is a
directory not a file. Is it safe to consider anything that's a folder
and ends in ".app" an application bundle?
John C. Randolph - 29 Sep 2006 05:20 GMT
> Let's say I've got two OSX Mach-O apps and app A has the ability to
> launch app B. Given a path to app B, how do I determine if it exists?
> Clearly, you have to append ".app" to the filename in order to find it
> in the first place but file system routines tell me that this is a
> directory not a file. Is it safe to consider anything that's a folder
> and ends in ".app" an application bundle?
Check the documenation for NSFileManager class. What you want are the
-fileExistsAtPath:.. and the -is...FileAtPath: methods.
-jcr