Gnome2::VFS::Mime(3)
π Gnome2::VFS::Mime π
okay bestie, welcome to Gnome2::VFS::Mime β this is the Perl glue for poking at MIME types through GNOME's VFS layer β¨ It ships as part of the gtk2-perl docs, so if you're here you're probably deep in some GNOME-adjacent Perl situation. Let's get into it, no cap.
πΈ METHODS πΈ
π boolean = Gnome2::VFS::Mime->id_in_application_list ($id, ...)
Does this app id live in that pile of applications? Returns a boolean, so like, true/false energy π
$idβ a string (the id we're hunting for)...β a (list) ofGnomeVFSMimeApplication's
π¦ list = Gnome2::VFS::Mime->id_list_from_application_list (...)
...β a (list) ofGnomeVFSMimeApplication's
Returns a list of application id's. That's the whole vibe β you hand it the app objects, it hands you back the ids, periodt. β¨
π string = Gnome2::VFS->get_mime_type_for_data ($data)
Sniff out the MIME type straight from the data itself, no filename needed.
$dataβ a (scalar)
π§ string = Gnome2::VFS->get_mime_type_for_name_and_data ($filename, $data)
Now we're cooking with both β the filename and the data get consulted together π₯
$filenameβ a (string)$dataβ a (scalar)
Since: vfs 2.14 β so if you're on anything older than that, sorry bestie, this one's not for you π
β string = Gnome2::VFS->get_mime_type_for_name ($filename)
Just the filename, that's it. Classic.
$filenameβ a (string)
Since: vfs 2.14
π string = Gnome2::VFS->get_mime_type ($text_uri)
Grabs the MIME type for a URI. Fast-ish, does its little thing.
$text_uriβ a (string)
π list = Gnome2::VFS::Mime->remove_application_from_list ($application_id, ...)
Bestie this one removes an app from the list β and it's giving two things at once because the return is a bit of a double feature π
$application_idβ a (string)...β a (list) ofGnomeVFSMimeApplication's
Returns a boolean indicating whether anything was removed and the resulting list of GnomeVFSMimeApplication's. So yeah, check the boolean to see if it actually did something, then enjoy your shiny new list.
π string = Gnome2::VFS->get_slow_mime_type ($text_uri)
Same idea as get_mime_type, but it takes its sweet time and actually looks at the file contents β hence "slow", and hence the accuracy glow-up π
$text_uriβ a (string)
Since: vfs 2.14
π SEE ALSO
Gnome2::VFS
π COPYRIGHT
Copyright (C) 2003-2007, 2013 by the gtk2-perl team.
This software is licensed under the LGPL. See Gnome2::VFS for a full notice.
and that's the whole page, bestie π«Ά this was perl v5.42.0, dated 2025-07-25 β go forth and MIME responsibly π β¨
π¦ where this page comes from
- fedora 43: perl-Gnome2-VFS 1.084-17.fc43 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms