How to find the file type.

Michael Pyne pynm0001 at comcast.net
Wed Aug 3 01:11:48 CEST 2005


On Monday 01 August 2005 16:56, Mark Bryars wrote:
> I'm writing a small utility at the moment using taglib, but i'd like to
> be able to find out what the file type of the file is, without assuming
> its the extension, is there a function to do this? I've not seen one, am
> I being blind or dense?

I believe that the rationale is that this is out of the scope of this kind of 
library.  i.e. most development environments already provide code to detect 
the file type of a file (e.g. KMimeType::findByContent() if you are 
programming for KDE).

GNOME (but not GTK+) also has a similar mechanism.  I'd paste the function 
names but my eyes are already burning.  It's documented at 
http://developer.gnome.org/doc/API/2.0/gnome-vfs-2.0/gnome-vfs-20-gnome-vfs-mime.html

Regards,
 - Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20050803/97678467/attachment.pgp


More information about the taglib-devel mailing list