Portability | portable (depends on GHC) |
---|---|
Stability | alpha |
Maintainer | gtk2hs-devel@lists.sourceforge.net |
- data VolumeMonitor
- class GObjectClass o => VolumeMonitorClass o
- volumeMonitor :: VolumeMonitor
- volumeMonitorGetConnectedDrives :: VolumeMonitorClass volumeMonitor => volumeMonitor -> IO [Drive]
- volumeMonitorGetDriveByID :: VolumeMonitorClass volumeMonitor => volumeMonitor -> DriveID -> IO (Maybe Drive)
- volumeMonitorGetMountedVolumes :: VolumeMonitorClass volumeMonitor => volumeMonitor -> IO [Volume]
- volumeMonitorGetVolumeByID :: VolumeMonitorClass volumeMonitor => volumeMonitor -> VolumeID -> IO (Maybe Volume)
- volumeMonitorGetVolumeForPath :: VolumeMonitorClass volumeMonitor => volumeMonitor -> FilePath -> IO (Maybe Volume)
- onVolumeMonitorVolumeMounted :: VolumeMonitorClass volumeMonitor => volumeMonitor -> (Volume -> IO ()) -> IO (ConnectId volumeMonitor)
- afterVolumeMonitorVolumeMounted :: VolumeMonitorClass volumeMonitor => volumeMonitor -> (Volume -> IO ()) -> IO (ConnectId volumeMonitor)
- onVolumeMonitorVolumePreUnmount :: VolumeMonitorClass volumeMonitor => volumeMonitor -> (Volume -> IO ()) -> IO (ConnectId volumeMonitor)
- afterVolumeMonitorVolumePreUnmount :: VolumeMonitorClass volumeMonitor => volumeMonitor -> (Volume -> IO ()) -> IO (ConnectId volumeMonitor)
- onVolumeMonitorVolumeUnmounted :: VolumeMonitorClass volumeMonitor => volumeMonitor -> (Volume -> IO ()) -> IO (ConnectId volumeMonitor)
- afterVolumeMonitorVolumeUnmounted :: VolumeMonitorClass volumeMonitor => volumeMonitor -> (Volume -> IO ()) -> IO (ConnectId volumeMonitor)
Types
An object that monitors volume mounts and unmounts.
data VolumeMonitor Source
Values
volumeMonitor :: VolumeMonitorSource
The global volume monitor object.
Operations
volumeMonitorGetConnectedDrivesSource
:: VolumeMonitorClass volumeMonitor | |
=> volumeMonitor |
|
-> IO [Drive] | the drives connected to the machine |
Returns a list of all drives connected to the machine.
volumeMonitorGetDriveByIDSource
:: VolumeMonitorClass volumeMonitor | |
=> volumeMonitor |
|
-> DriveID |
|
-> IO (Maybe Drive) | the requested
drive, or |
Try to find the Drive
with ID id
.
volumeMonitorGetMountedVolumesSource
:: VolumeMonitorClass volumeMonitor | |
=> volumeMonitor |
|
-> IO [Volume] | the volumes currently mounted on the machine |
Returns a list of all volumes currently mounted on the machine.
volumeMonitorGetVolumeByIDSource
:: VolumeMonitorClass volumeMonitor | |
=> volumeMonitor |
|
-> VolumeID |
|
-> IO (Maybe Volume) | the requested
volume, or
|
Try to find the Volume
with ID id
.
volumeMonitorGetVolumeForPathSource
:: VolumeMonitorClass volumeMonitor | |
=> volumeMonitor |
|
-> FilePath | the path to find the volume for |
-> IO (Maybe Volume) | the volume the
path resides
on, or
|
Returns the Volume
corresponding to path, or Nothing
.
The volume referring to path is found by calling stat
on path,
and then iterating through the list of volumes that refer to
currently mounted local file systems. The first volume in this
list maching the path's UNIX device is returned.
If the stat
on path was not successful, or no volume matches
path, Nothing
is returned.