Re: Random idea:
Hello chen!
On Thu, 30 December 1999 at 08:51:19, you wrote:
>
> The program creating the file can record the file type when creating it.
> There can be a default file type umask
Looks reasonable but I doubt that it works without problems.
Too simple and much too weak if you ask me.
> It can be controled from command line by chtype [file] [type]
That's what our clumsy *.foo.bar conventions did for ages. ;-)
> I don't think it should be verified. if the type is wrong, the program
> trying to use it will complain nicely
How can it complain? It relied exclusively on the type the
filesystem gave out! And if it cannot rely on this - what
is it good for?
> > - types would need to be determined from the data alone so
> > that foo.txt would be clearly identifiable as X-Bitmap if
> > foo.txt's data is a valid X-Bitmap - but what are you going
> > to do about foo.txt.gz? After all - you are still interested
> > in the X-Bitmap and you probably regard compression as something
> > that should be somewhat transparent, don't you.
>
> no it can be identified as gzip compressed file.
It can - but it would be most convenient if compression would
be transparent.
> What I'm suggesting is to save the info in the file system itself.
> I think that because of the way hurd implements file systems, it
> may work nicely.
Nobody is going to stop you from hacking your own file system
servers - I would still suggest you take a look at the URL
"http://www.tuxedo.org/~esr/magic-numbers/" - perhaps this
project is not as dead as I thought. ;-)
(There is also a Mailing List Archive online at the following
URL: "http://www.tuxedo.org/~esr/magic-numbers/mail-archive/"
- you may consider "man file" for a smooth introduction to the
wonderful world of magic numbers.)
Besides - a web server such as apache might even benefit from
a file system that carries type information, so feel free to
implement one.
/bye
Dirk
Reply to: