[Nautilus-list] Future versions of gnome-vfs sharing MIME database with file(1)



on 10/7/01 12:19 PM, monkeyiq at monkeyiq users sourceforge net wrote:

> I don't know which file(1) you are using, but,
> 
> $ file -i /usr/bin/file
> /usr/bin/file: application/x-executable, dynamically linked (uses shared
> libs), not stripped
> 
> the file I use has mime included, and I have made it into a shared library
> libfile.so and modified the client to use it a while back. I'm still in
> the process of merging my changes into the main tree.

I didn't realize that file(1) has two separate magic files, one for MIME and
one for non-MIME.

We might want to merge the magic number database used by gnome-vfs with
what's used by file(1). While invoking the file tool each time is
impractical, we might be able to start using libfile.so in a future version
of gnome-vfs. Does libfile.so have a streaming interface, or does it require
a filesystem file? The gnome-vfs MIME sniffing code has a nicely flexible
interface (found in gnome-vfs-sniff-buffer.h) based on passed-in seek and
read functions, and it has special code to recognize text, mp3, and gzip
files better than you can do with a magic file entry.

At the moment, the gnome-vfs MIME magic table has a lot of entries for
common types that aren't in the file(1) MIME magic table, but we can fix
that too.

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]