MACOS API to get to know Pakage info of a file.

Discussion in 'Mac Programming' started by imranpundeer, May 21, 2009.

  1. imranpundeer macrumors newbie

    Jan 10, 2009
    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.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    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.
  3. imranpundeer thread starter macrumors newbie

    Jan 10, 2009

Share This Page