gio.volume_monitor

Module for [VolumeMonitor] class

Types 3

gio.volume_monitor.VolumeMonitor is for listing the user interesting devices and volumes on the computer. In other words, what a file selector or file manager would show in a sidebar.

gio.volume_monitor.VolumeMonitor is not thread-default-context aware (see glib.main_context.MainContext.pushThreadDefault), and so should not be used other than from the main thread, with no thread-default-context active.

In order to receive updates about volumes and mounts monitored through GVFS, a main loop must be running.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
VolumeMonitor self() nothrowReturns `this`, for use in `with` statements.
VolumeMonitorGidBuilder builder() static nothrowGet builder for [gio.volume_monitor.VolumeMonitor] Returns: New builder object
gio.volume.Volume adoptOrphanMount(gio.mount.Mount mount) static nothrowThis function should be called by any #GVolumeMonitor implementation when a new #GMount object is created that is not associated with a #GVolume object. It must be called just before emitting the m...
gio.volume_monitor.VolumeMonitor get() static nothrowGets the volume monitor used by gio. Returns: a reference to the #GVolumeMonitor used by gio. Call [gobject.object.ObjectWrap.unref] when done with it.
gio.drive.Drive[] getConnectedDrives() nothrowGets a list of drives connected to the system.
gio.mount.Mount getMountForUuid(string uuid) nothrowFinds a #GMount object by its UUID (see [gio.mount.Mount.getUuid])
gio.mount.Mount[] getMounts() nothrowGets a list of the mounts on the system.
gio.volume.Volume getVolumeForUuid(string uuid) nothrowFinds a #GVolume object by its UUID (see [gio.volume.Volume.getUuid])
gio.volume.Volume[] getVolumes() nothrowGets a list of the volumes on the system.
gulong connectDriveChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.drive.Drive))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `DriveChanged` signal.
gulong connectDriveConnected(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.drive.Drive))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `DriveConnected` signal.
gulong connectDriveDisconnected(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.drive.Drive))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `DriveDisconnected` signal.
gulong connectDriveEjectButton(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.drive.Drive))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `DriveEjectButton` signal.
gulong connectDriveStopButton(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.drive.Drive))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `DriveStopButton` signal.
gulong connectMountAdded(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.mount.Mount))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `MountAdded` signal.
gulong connectMountChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.mount.Mount))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `MountChanged` signal.
gulong connectMountPreUnmount(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.mount.Mount))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `MountPreUnmount` signal.
gulong connectMountRemoved(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.mount.Mount))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `MountRemoved` signal.
gulong connectVolumeAdded(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.volume.Volume))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `VolumeAdded` signal.
gulong connectVolumeChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.volume.Volume))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `VolumeChanged` signal.
gulong connectVolumeRemoved(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gio.volume.Volume))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gio.volume_monitor.VolumeMonitor))) && Parameters!T.length < 3) nothrowConnect to `VolumeRemoved` signal.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
VolumeMonitor build() nothrowCreate object from builder. Returns: New object