• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder Info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Info


  • Subject: Re: Finder Info
  • From: koko <email@hidden>
  • Date: Fri, 24 Aug 2012 23:12:55 -0600

A nice tutorial … thanks!

-koko

On Aug 24, 2012, at 9:59 PM, koko wrote:

> 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


_______________________________________________

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


References: 
 >Re: Finder Info (From: Greg Guerin <email@hidden>)
 >Re: Finder Info (From: koko <email@hidden>)

  • Prev by Date: Re: Finder Info
  • Next by Date: NSScrollView scroll scale image problem
  • Previous by thread: Re: Finder Info
  • Next by thread: Is it feasible to nest NSTableViews inside a view-based NStableView ?
  • Index(es):
    • Date
    • Thread