Re: [Fwd: gnome-vfs-mime.h should be in gnome-vfs ?]



On Sun, 2002-09-01 at 14:25, Bastien Nocera wrote:
> On Sun, 2002-09-01 at 19:56, Seth Nickell wrote:
> > On Fri, 2002-08-30 at 06:16, Michael Meeks wrote:
> > > Hi Bastien,
> > > 
> > > On Fri, 2002-08-30 at 00:06, Bastien Nocera wrote:
> > > > Just talked to Anders about it. I need the very simple:
> > > > gnome_vfs_mime_type_from_name() function in freecell (from the
> > > > gnome-games), and this function is only available in gnome-vfs-module,
> > > > not in gnome-vfs.
> > > 
> > > 	Why do you need the mime_type_from_name function ? it's un-reliable,
> > > and only uses extension matching; why not use gnome_vfs_get_mime_type ?
> > > It's more accurate, and hopefully only slightly slower, I can't imagine
> > > what freecell would be needing to do to thousands of files that would
> > > make a perceptible difference there.
> > 
> > I believe the kosher way of doing this is actually to use get_file_info.
> 
> Problem is we only get the name of the file, not its complete path. I
> guess this function would need a bit of a rework. I still don't see what
> this function is doing in gnome-vfs-module and not in gnome-vfs.
> 
> I'll just file a bug for Ross to fix ;)

I guess because GnomeVFS is for VFS operations.... If you don't have a
full path, you don't really have a VFS operation ;-) The ability to
detect files based only on the file name was primarily considered a
convenience function for modules. I'm still hard put to think of major
situations where you have a filename that needs to be displayed with
MIME information, but you have no access to the actual data?

-Seth




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