On Wed, 22 Dec 2004 08:35:05 -0500, Dan Carlson
<minutiaeman(a)st-minutiae.com> wrote:
On Dec 21, 2004, at 2:20 PM, Jamie Bliss wrote:
Are there any errors? If not, what happens to the
file? And is this
from a Mac, Windows, or Unix-based? (I believe that Macs store the
file type seperately from the file name; ie no extensions).
All recent Macintosh systems use the file type extensions just like
Windows and Unix systems. (In fact, Mac OS X is "really" a Unix (or
BSD) OS anyway, with an Apple-designed GUI sitting on top.)
Unix (or more properly Posix) systems don't require file type
extensions in the file name. The usual way to determime the file type
is to "sniff" the contents of the file as well as certain directory
information to derive it's mime type. The file command on posix
system is a user command which does this sniffing.
The traditional Mac file system(s) did more than just storing the file
type separately, Mac files had two 'forks' The data fork usually
corresponds to the file contents on other systems, while the resource
fork is actually a small data base in which resources can be looked up
by resource type and resource id. Some of those resources are the File
creator which contains a code identifying the application which
created the file, and the file type which indentifies the kind of file
that this is for that application. So, for example a Word doc file
and a Word rtf file will have the same creator but different file
types. The resource fork can contain other things as well, such as an
icon to override the one normally shown in the finder (which is
determined by the combination of type and creator), and anything else
the application wants to store there. In the case of executable
files, almost everything including the executable code is actually
stored in the resource fork as resources.
The above is based on memory, I don't khow they are doing this under OS X.