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
VolumeMonitor self()Returns `this`, for use in `with` statements.VolumeMonitorGidBuilder builder()Get builder for [gio.volume_monitor.VolumeMonitor] Returns: New builder objectgio.volume.Volume adoptOrphanMount(gio.mount.Mount mount)This 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()Gets 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()Gets a list of drives connected to the system.gio.mount.Mount getMountForUuid(string uuid)Finds a #GMount object by its UUID (see [gio.mount.Mount.getUuid])gio.mount.Mount[] getMounts()Gets a list of the mounts on the system.gio.volume.Volume getVolumeForUuid(string uuid)Finds a #GVolume object by its UUID (see [gio.volume.Volume.getUuid])gio.volume.Volume[] getVolumes()Gets 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect 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)Connect to `VolumeRemoved` signal.Fluent builder for [gio.volume_monitor.VolumeMonitor]
Methods