Re: Finder Info
Re: Finder Info
- Subject: Re: Finder Info
- From: koko <email@hidden>
- Date: Fri, 24 Aug 2012 21:59:44 -0600
Excellent … much easier than
make a FSRef
if(m_FSRef) free((void*)m_FSRef);
m_FSRef = malloc(sizeof(FSRef));
memset(m_FSRef,0x00,sizeof(FSRef));
const UInt8 *cpath = (const UInt8 *)[path cStringUsingEncoding:NSUTF8StringEncoding];
OSStatus osStatus = FSPathMakeRef(cpath,m_FSRef,false);
SetCatalogNfo
if(m_FSCatalogInfo) free(m_FSCatalogInfo);
m_FSCatalogInfo = malloc(sizeof(FSCatalogInfo));
memset(m_FSCatalogInfo,0x00,sizeof(FSCatalogInfo));
OSErr osErr = FSGetCatalogInfo(m_FSRef,kFSCatInfoFinderInfo|kFSCatInfoVolume,m_FSCatalogInfo,NULL,NULL,NULL);
if(osErr != noErr)
// handle error
else
{
strncpy((char*)m_FSCatalogInfo->finderInfo,"TXET",4); // going to Big endian machine
strncpy((char*)&m_FSCatalogInfo->finderInfo[4],"EIWC",4);
osErr = FSSetCatalogInfo (m_FSRef,kFSCatInfoFinderInfo,m_FSCatalogInfo);
if(osErr != noErr)
// handle error
}
On Aug 24, 2012, at 4:54 PM, Greg Guerin wrote:
> koko wrote:
>
>> I forgot to add that the deployment target is 10.4 … which is why I asked …
>
>
> Look at NSFileManager's deprecated methods, and find changeFileAttributes:atPath: .
>
> -- GG
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden