Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / September 2006



Tip: Looking for answers? Try searching our database.

Determining if an application bundle exists

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RogueWarrior - 29 Sep 2006 04:41 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?
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.