#!/usr/bin/perl
use Gnome2::VFS;
use URI::URL;
use strict;

# this is just a simple one-liner to create A URI for this file:
my $file = URI::URL->new($0, sprintf('file://%s', $ENV{PWD}))->abs->as_string;

#
# This script should print out the MIME type of itself.
# argument. But it doesn't :-( GB/04/07/09
#

Gnome2::VFS->init;

# GnomeVFSFileInfoOptions can be:	'default',		'get-mime-type',	'force-fast-mime-type',
#					'force-slow-mime-type',	'follow-links',		'get-access-rights'
my $info = Gnome2::VFS->get_file_info($file, 'get-mime-type');

print "\$info is a '".ref($info)."' object\n";

print "MIME type is: ".$info->get_mime_type."\n";

exit;
