Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

imranpundeer

macrumors newbie
Original poster
Jan 10, 2009
25
0
Hi All,
I am searching an API that can provide me that a particular file is a Package or not. Currently i am using NSWORKSPACE IsFlePackageAtPath API inside my deamon Application. But it is working fine on 10.5 MAC OS when used witihn my Deamon.

But when i m using the same API on MACOS 10.4 ppc, my deamon is restarting after using this API.

Please anybody know any other method for the same problem on MAC OS 10.4.
Any help would be appricated.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Are you sure this is the actual problem? Have you looked at the crash report, and/or Console, to see why it's crashing? I have found several times that Tiger will crash often where Leopard will not, because Leopard is more forgiving.

But to answer your question, you can use LSCopyItemInfoForURL(), which gives you a LSItemInfoRecord and from there you can check its flags for kLSItemInfoIsPackage.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.