Re: Gnome2::VFS::FileInfo->get_mime_type

On Fri, 2004-07-09 at 07:28, Gavin Brown wrote:
Below is a script that, as far as I can tell, should print out the MIME
type (as determined by GnomeVFS) of itself. But I can't get it to print
anything. I'm not sure if this is a bug or maybe my code's wrong.
Torsten's busy so I thought I'd pass it out the list.

the previous code doesn't work for me and i don't know what's wrong with
it. this code (based mainly on the test) does seem to work though.

use Gnome2::VFS;
use Cwd;

my $info = Gnome2::VFS->get_file_info(cwd() . '/'. shift @ARGV,

use Data::Dumper;
print Dumper ($info);
print "\$info is a '".ref($info)."' object\n";
print "MIME type is: ".$info->get_mime_type."\n";


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