Toby Thain wrote:
On 16/12/11 11:43 AM, Holm Tiffe wrote:
Cameron Kaiser wrote:
Extensions
are extensions. All the above is just interpretation. File
association is not rocket science (though it's been reinvented too many
times). The interesting exception is classic MacOS with its type/creator
codes independent of extension (and where extensions were initially
absent, though like Unix, supported as part of the file name).
I have always loved type/creator codes, and was very unhappy with Apple
for
removing them in 10.6 (but I'm 10.4 forever, so I guess it's not really my
concern).
The gap was that the core OS did not provide an easy way to manipulate
this
consistently, requiring a cavalcade of minitools (or a trip to ResEdit) to
set them the way you wanted. But I loved being able to force certain
files to
automatically open in different apps if I wanted to, and at least for a
time
OS X gave you the choice.
--
------------------------------------ personal:
http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems *
www.floodgap.com *
ckaiser at
floodgap.com
-- Nothing recedes like success. -- Walter Winchell
---------------------------
OS X is not Unix in this case and Unix never ever decided what to do with a
file by its extension but t does by its magic number (look for /etc/magic).
Unix traditionally *doesn't* do that either.
How do you think an unix shell is starting an excecutable file and trough
wich mechanism it knows what todo with an perl script, an shell script, an
C-shell scipt, and different kinds of executable binary formats?
It looks in the file for its header and is starting the correct command
interpreter for running that file or set up the environment for executing a
binary executable.
In unix a shell is doing this, so the guy above with it's CP/M hint is
really right here.
Automatic file associations are a post-GUI idea, in general, to my
recollection. Traditionally in Unix you can apply any program to any
file. It may or may not sniff! It may or may not crash. etc. :)
It is pretty hard on the traditional Unix command line to say: "open
this file with whatever program can deal with it". [OS X has such a
command; I think GNOME does; but again: post-GUI.]
(I am aware of 'file', but that doesn't, to me, do what you're
suggesting.)
BTW:
touch what.the.heck.for.an.ext.tension.do.you.mean.?
$ ls -l what*
-rw-r--r-- 1 holm holm 0 16 Dez 17:40
what.the.heck.for.an.ext.tension.do.you.mean.?
$ rm what*
$
I'm not sure what this is meant to illustrate?
Where is the file extension of this file and which one is to be used for
that what you want?
Files should have an header wich describes what type of data the file
represents. An Handler in the OS or one of the user shells (if Gui or not)
could decide this way what todo with it regarding the capabilities that the
concrete environment actually has.
This is exactly what the /etc/magic mechanism is doing.
Regards,
Holm
--
Technik Service u. Handel Tiffe,
www.tsht.de, Holm Tiffe,
Freiberger Stra?e 42, 09600 Obersch?na, USt-Id: DE253710583
www.tsht.de, info at tsht.de, Fax +49 3731 74200, Mobil: 0172 8790 741