Re: What to do?
Re: What to do?
- Subject: Re: What to do?
- From: Andrew Mortensen <email@hidden>
- Date: Fri, 22 Feb 2002 10:56:55 -0500 (EST)
NSString *path = @"/Applications/OmniWeb.app";
if ( [[ NSWorkspace sharedWorkspace ] isFilePackageAtPath: path ] == YES )
{
/* path is package, don't treat it like a directory */
} else { /* -isFilePackageAtPath returned NO */
/* path isn't package, isn't a folder, or doesn't exist */
}
On Fri, 22 Feb 2002, Lukasz Kuczborski wrote:
>
I also found something like this:
>
>
isFilePackageAtPath:
>
>
- (BOOL)isFilePackageAtPath:(NSString *)fullPath
>
>
Determines whether fullPath is a file package.Returns NO if fullPath does
>
not exist, or is not a directory.
>
>
>
But i don't know how to implement it onto my code...caan u help me..i have
>
problems with (BOOL) methods...i don't know how to call it!
>
;)
>
TIA
>
>>
>
>> while(pname = [direnum nextObject])
>
>> {
>
>> if(isFile) // <- What should i insert here, so it would work????
>
>
>
> Look at NSWorkspace's getInfoForFile:application:type:. Call it, and if
>
> the constant it returns is NSPlainFileType, load it into your table.
>
>
>
> andrew
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.