This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Filename Extensions Must Die

Determining the type of a file by its name is a practise which should be phased out.

1.1. Rationale

1.2. Implementation

The obvious solution right now is to go with hooking an extended attribute lookup into the GNOME VFS local filesystem file type lookup routine, rather than sniffing file contents. Interestingly, the HTTP backend already implements this much more reliably than the local backend, as it uses a HEAD request to ask the web server for the type of a particular resource.

If a proper type lookup cannot be done, then a fallback to the current implementation should be in place.

"gnomevfs-ls --type=major/minor" to filter based on type.

Hiding filename extensions in Nautilus is not a valid solution, as the appearance of two distinct files "My Web Page.htm" and "My Web Page.html" would be indistinguishable.

1.3. Outstanding Issues

1.4. Comments

Please discuss!


I agree with the first three points of the rationale whole-heartedly. However, file type is a necessary element in the unique key of a file so that users and applications can cache the different formats of a file side by side. For example, file.c and file.o, or report.txt, reprot.html, report.doc, report.tex, report.pdf.gz, &c. I think that storing a MIME type in an extended attribute (as when you download a file with wget or firefox) and using that data when available (as with gnome-open) to avoid typical confusion and user error is a fantastic idea, but as long as the extension is a part of a file's unique key, it is also imperative that it be transparent to the user and edited with the file name as one. - KrisKowal


2024-10-23 10:58