Re: Not getting filetype info from FSGetcatlogInfo() function
Re: Not getting filetype info from FSGetcatlogInfo() function
- Subject: Re: Not getting filetype info from FSGetcatlogInfo() function
- From: Elango C <email@hidden>
- Date: Fri, 6 Jan 2006 17:39:45 +0530
Matt,
I am clear about your comment, any how I tried to assigned the output of
FSGetCatalogInfoBulk (i.e. the cataloginfo which are returned by
FSGetCatalogInfoBulk funtion) but still am not getting the filetype.
--Elango
On 1/6/06, Matt Gough <email@hidden> wrote:
>
> On 5 Jan 2006, at 07:25, Elango C wrote:
>
> > FileInfo *fileInfo = NULL;
> > enumDir = FSGetCatalogInfoBulk(iterator, 255, &actualObjects,
> > &containerChanged, kFSCatInfoNone, NULL, newSrcFSRefs, NULL, NULL);
> > for (i = 0; i < actualObjects; i++)
> > {
> > memset(&catalogInfo, 0, sizeof(catalogInfo));
> > osErr = FSGetCatalogInfo (&newSrcFSRefs[i],
> > kFSCatInfoGettableInfo, &catalogInfo, &outName, NULL, NULL);
> > fileInfo = (FileInfo *) catalogInfo.finderInfo;
> > fileInfo->fileType; // It has to return ICNS or APPL
> > // based on the file type
> > }
>
>
> Your code is a bit inefficient. You should use FSGetCatalogInfoBulk
> for what it is intended for, and not just a way to count the items in
> a directory. It is silly to then manually do FSGetCatalogInfo on each
> file when Bulk could have got all that for you.
>
> Matt
>
_______________________________________________
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