NSWorkspace's isFilePackageAtPath: returns always NO
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