• 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: Type/Creator codes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Type/Creator codes


  • Subject: Re: Type/Creator codes
  • From: Richard Kiss <email@hidden>
  • Date: Sun, 13 May 2001 14:11:26 -0700

on 5/13/2001 09:53:03 +1000, Jamie Curmi <email@hidden> wrote:

> I can't seem to find any cocoa API for setting Type/Creator codes on
> files you create. Does anyone know of any?
>
> If not, a few questions:
>
> 1) Is Apple working on some?
> 2) I'm totally new to programming on the mac, so I have no idea how to
> do this is in carbon. Could someone share how to do this, and maybe I
> could write a cocoa wrapper for it? Assuming Apple aren't going to
> release one soon?

This is a little off topic.

There does not seem to be any Cocoa API, and Carbon-based sample code has
been posted. I have some Darwin-based sample code that makes kernel calls to
change HFS metadata. It uses setattrlist directly, which is neither
well-documented nor particularly easy to use, but it could make a basis for
Objective-C wrappers that do not depend upon Carbon.

It also forms the basis for a tiny command-line tool that changes HFS
metadata (like /Developer/Tools/SetFile, which probably uses Carbon and
won't run on Darwin). I intend to release this someday, and hopefully
contribute it to Darwin.

-- Richard


  • Prev by Date: Re: Cocoa docs
  • Next by Date: Re: Reaching the limits of 'learn by example'
  • Previous by thread: Re: Type/Creator codes
  • Next by thread: Re: Type/Creator codes
  • Index(es):
    • Date
    • Thread