[Tutor] Creating typed files with Python, BeOS (OT)

Erik Price erikprice@mac.com
Sun, 12 May 2002 17:51:09 -0400


On Sunday, May 12, 2002, at 05:37  PM, dman wrote:

> Just some clarification :
>
> AFAIK there is no filesystem "Posix".  Instead there are several
> implementations of a posix-style fs (ext2, ext3, reiserfs, xfs, ...).
> These file systems don't care about so-called "extensions".  It really
> isn't an extension, it's just part of the name ('.' is a legal
> character in a name).  On UNIX systems the "extension" is only used by
> a few programs, such as the C compiler or the python interpreter, but
> otherwise is just a convention for human consumption.  On UNIX systems
> a file is a file is a file.  It's up to the application do decide what
> to do with the byte stream contained in it.

Further clarification, for the curious:

If the particular blend of Unix that you use is Mac OS X, then keep in 
mind that one of the applications that dman mentions which depends on 
file extensions is the all-important Finder -- which is just as much an 
application as any other program on the system.  Finder uses the file 
extension to determine what action to take upon double-click or Cmd-O 
(open).  Usually this is simply deciding which application should be 
used to open the file.

Note that, to preserve the older MacOS style, the Finder includes a 
preference which allows file extensions to be hidden from view, but 
generally the extensions are still there (the Finder just doesn't 
display them).  Many applications on Mac OS X will generate the 
appropriate extension for you, regardless of whether you are actually 
showing extensions or not.

> I think MacOS has concept too, but I'm not sure about Darwin.

I'm not a specialist on hfs+ (the filesystem used by most Macs), but I 
do know that the original Mac OS did use metadata (such as type/creator 
codes), but Darwin does not.


Erik