Gnome2::VFS::Mime(3)

πŸ“¦
version 1.084 Β· 2 versions
, in fedora 43

πŸ’– 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) of GnomeVFSMimeApplication's

πŸ¦‹ list = Gnome2::VFS::Mime->id_list_from_application_list (...)

  • ... β€” a (list) of GnomeVFSMimeApplication'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) of GnomeVFSMimeApplication'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 (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