GNOME Bugzilla – Bug 324185
public guess_mime_from_filename API
Last modified: 2006-01-16 14:57:48 UTC
there are many functions (some of them redundant) in gnome vfs that allow to guess the mime type from a filename even when the corresponding file doesn't exist, for instance gnome_vfs_mime_type_from_name_or_default. However all of there functions are only available to the vfs methods and not to normal users of the library. We really need such api so that when 'gedit foo.c' is launched from the terminal (foo.c doesn't exist) the proper highlighting is used. On the first save the proper sniffing is then done.
Fixed in cvs HEAD.