Gnome2:...Monitor(3)

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

✨ Gnome2::VFS::VolumeMonitor β€” bestie edition ✨

okay so this is a page from the User Contributed Perl Documentation manual, section 3, and it's all about Gnome2::VFS::VolumeMonitor πŸ’–


🌸 NAME 🌸

Gnome2::VFS::VolumeMonitor β€” it's literally just a wrapper for GnomeVFSVolumeMonitor. that's it. that's the whole job. she's a middlewoman and she's slaying at it πŸŽ€


πŸ¦‹ HIERARCHY πŸ¦‹

the family tree, and yes she's an only child of Glib::Object:

Glib::Object
+----Gnome2::VFS::VolumeMonitor

πŸ’… METHODS πŸ’…

✨ list = $volume_monitor->get_connected_drives ✨

gives you a list of everything currently plugged in and vibing. no arguments, no drama, just drives 🫢

✨ drive = $volume_monitor->get_drive_by_id ($id) ✨

you hand her an id, she hands you back the matching drive.

  • $id β€” it's unsigned. that's the whole spec, bestie, don't come for me πŸ™ˆ

✨ list = $volume_monitor->get_mounted_volumes ✨

returns a list of all the mounted volumes. the ones that are actually there there. periodt πŸ’…

✨ volume = $volume_monitor->get_volume_by_id ($id) ✨

same deal as the drive one but for volumes β€” you give an id, you get a volume back.

  • $id β€” again, unsigned.

✨ volume = $volume_monitor->get_volume_for_path ($path) ✨

got a path and wanna know which volume it lives on? this is her. she will find it for you πŸ”

  • $path β€” a string, obvi.

✨ volumemonitor = Gnome2::VFS->get_volume_monitor ✨

this one's a class method, not an instance thing β€” you call it on Gnome2::VFS itself and it hands you back a volumemonitor. iconic entry point energy πŸ‘‘


🌈 SIGNALS 🌈

these are the little notifications she sends out when stuff happens. each one comes with its own cast:

  • drive-connected β€” fires with (Gnome2::VFS::VolumeMonitor, Gnome2::VFS::Drive) ✨ a drive showed up!
  • drive-disconnected β€” fires with (Gnome2::VFS::VolumeMonitor, Gnome2::VFS::Drive) 😭 a drive peaced out.
  • volume-mounted β€” fires with (Gnome2::VFS::VolumeMonitor, Gnome2::VFS::Volume) πŸ”₯
  • volume-pre-unmount β€” fires with (Gnome2::VFS::VolumeMonitor, Gnome2::VFS::Volume) ⚠️ heads up, this volume is about to unmount.
  • volume-unmounted β€” fires with (Gnome2::VFS::VolumeMonitor, Gnome2::VFS::Volume) πŸ’€ and it's gone.

πŸŽ€ SEE ALSO πŸŽ€

go read these too, they're the supporting cast:

  • Gnome2::VFS
  • Glib::Object

Copyright (C) 2003-2007, 2013 by the gtk2-perl team.

This software is licensed under the LGPL. See Gnome2::VFS for a full notice.

fr fr, if you need the whole legal spiel, it's over in Gnome2::VFS. this page is just the highlights πŸ’œ

and that's the whole thing bestie πŸ¦‹ this was perl v5.42.0, dated 2025-07-25, straight from the Gnome2:...Monitor(3) page β€” mwah, no notes πŸ’‹

πŸ“¦ where this page comes from