Re: [NTLK] Newton packages versus OS X packages

From: Norman Palardy (palardyn_at_shaw.ca)
Date: Sun Feb 20 2005 - 14:44:25 PST


On Feb 20, 2005, at 3:17 PM, David M. Ensteness wrote:

>
>>>> They are moving to a Unix model. Unix doesn't care about types and
>>>> creators.
>
>>> Anyway, one can support type and creator codes even with Mac OS X's
>>> Unix underpinnings -- provided one wants to.
>
> Apple *has* moved to UNIX. And correct, UNIX doesn't care about type
> and creator codes because UNIX does not deal with forked files. No OS
> but Classic Macintosh and Mac OS X understand forked files [maybe NOS
> does, I do not think that BeOS does, UNIX/Linux/Windows do not].
> However, forked files are THANKFULLY not going away.

They are being deprecated and now resources are stored in the data
forks of resource files.
The older forked style CAN still be read but the preference for new
tools is to NOT create forked files at all.
Resources are not going away (yet) but forked files are being
deprecated.

> Mac OS X maintains file extension compatibility, thanks to BSD and
> NeXTSTEP, but also supports metadata in the form of type and creator
> codes which are stored in the resource fork of a forked file.

Or in a plist file in a bundle.
Try this.
Find TextEdit.
Control click it and you will see the Show Pakage Contents item
Select it.
You should get a new window in OS X that has a single folder "Contents"
Open that folder.
The type and creator codes are stored in the PkgInfo file which you can
open in TextEdit.
It's a plain text file with no resource fork.

Most new OS X apps are this way and do not use "resources" in the
traditional sense or forked files at all.

> The issue is that since Macintosh and Mac OS X are the only operating
> systems that support forked files, non-Mac OS X UNIX/Linux systems,
> Windows systems, etc ... all just ignore the resource fork and during a
> file transfer the resource fork is not copied.

NT/XP supports them but has no installed file systems that use them.
If there are files with resource forks (like newton packages) they can
get dropped during transfer.

> That is why if you use the UNIX command cp to copy a file its resource
> fork is lost. And if you need some evidence that Apple *is not* getting
> rid of type and creator codes, they also included the UNIX command
> maccp (or is it cpmac, I can't seem to remember its exact name, not
> sure if its included by default install but it is included with the dev
> tools] which does copy the resource fork.

An appropriate cp command with options (-Rp) should copy a new OS X
application or file bundle.

CpMac is provided if you install the dev tools.
ditto is another way to copy older resource fork based apps that is NOT
required for newer OS X apps.

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Sun Feb 20 2005 - 16:00:01 PST