• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSWorkspace's isFilePackageAtPath: returns always NO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWorkspace's isFilePackageAtPath: returns always NO


  • Subject: NSWorkspace's isFilePackageAtPath: returns always NO
  • From: "Adrian R. Foltyn" <email@hidden>
  • Date: Fri, 15 Oct 2004 14:38:58 +0200

Hi people,

I have this simple function and no matter if filePath stores a folder or a package, the function always returns NO.


BOOL isPackage(NSString *filePath) {
return [[NSWorkspace sharedWorkspace] isFilePackageAtPath:filePath];
}

If the item referenced in filePath would not exist then the following function would also return NO:

BOOL doesExist(NSString *filePath) {
return [[NSFileManager defaultManager] fileExistsAtPath:filePath];
}

But it does not, "doesExist(filePath)" return YES, the item is a package and still "isPackage(filePath)" returns NO.


I need this function in a command line utility. The project was created in Xcode from the Foundation Tool preset. I added the line "#import <Cocoa/Cocoa.h>" right below "#import <Foundation/Foundation.h>". Is there something else I have to do to make use of the NSWorkspace class?

Thanks for any help,

Adrian

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: NSWorkspace's isFilePackageAtPath: returns always NO
      • From: "Louis C. Sacha" <email@hidden>
  • Prev by Date: Re: [NEWBIE]: Scrolling windows
  • Next by Date: OSD api?
  • Previous by thread: Re: [NEWBIE]: Scrolling windows
  • Next by thread: Re: NSWorkspace's isFilePackageAtPath: returns always NO
  • Index(es):
    • Date
    • Thread