Re: Magic is useless!
- From: James Henstridge <james daa com au>
- To: Maciej Stachowiak <mjs noisehavoc org>
- Cc: Seth Nickell <snickell stanford edu>, Raphael Bosshard <whistler x-files ch>, "Gnome 2.0 List" <gnome-2-0-list gnome org>
- Subject: Re: Magic is useless!
- Date: Mon, 07 Jan 2002 23:13:55 +0800
Maciej Stachowiak wrote:
Most major file formats already have a detectable magic byte
signaturate, though some of the now prospering "human readable"
formats using XML or whatever are a thorn in the side (particularly
if they are compressed, grr). But this would be a good complement.
XML is reasonably OK, actually, since a proper XML document has a DTD
declaration at the top that you can look for. The main problem is
compressed files and archives, since you need to either look inside
the compression/archiving, or allow suffixes to take precedence for
those types (returning to the bad old suffix-based world for those
kinds of files). We really should come up with a solution to this in
gnome-vfs, since it is a frequent user complaint.
Is it just me, or do file extensions and mime types stored in the
filesystem as metadata seem equivalent? Both move with the file in the
filesystem (provided the app/user doesn't decide to change them), and
won't be available if just reading from a bytestream (in which case you
will need to get the information some other way, such as file magic).
The benefit of file extensions is that they are maintained over almost
every file system type.
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]