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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net
> 
> This email sent to k...@highrolls.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to