gi-gio-2.0.27: Gio bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gio.Structs.UnixMountPoint

Contents

- Exported types
- Methods
  - Overloaded methods
  - at
  - compare
  - copy
  - free
  - getDevicePath
  - getFsType
  - getMountPath
  - getOptions
  - guessCanEject
  - guessIcon
  - guessName
  - guessSymbolicIcon
  - isLoopback
  - isReadonly
  - isUserMountable

Description

Defines a Unix mount point (e.g. <filename>/dev</filename>). This corresponds roughly to a fstab entry.

Synopsis

- newtype UnixMountPoint = UnixMountPoint (ManagedPtr UnixMountPoint)
- unixMountPointAt :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe UnixMountPoint, Word64)
- unixMountPointCompare :: (HasCallStack, MonadIO m) => UnixMountPoint -> UnixMountPoint -> m Int32
- unixMountPointCopy :: (HasCallStack, MonadIO m) => UnixMountPoint -> m UnixMountPoint
- unixMountPointFree :: (HasCallStack, MonadIO m) => UnixMountPoint -> m ()
- unixMountPointGetDevicePath :: (HasCallStack, MonadIO m) => UnixMountPoint -> m [Char]
- unixMountPointGetFsType :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text
- unixMountPointGetMountPath :: (HasCallStack, MonadIO m) => UnixMountPoint -> m [Char]
- unixMountPointGetOptions :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text
- unixMountPointGuessCanEject :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
- unixMountPointGuessIcon :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Icon
- unixMountPointGuessName :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Text
- unixMountPointGuessSymbolicIcon :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Icon
- unixMountPointIsLoopback :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
- unixMountPointIsReadonly :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool
- unixMountPointIsUserMountable :: (HasCallStack, MonadIO m) => UnixMountPoint -> m Bool

# Exported types

newtype UnixMountPoint Source #

Memory-managed wrapper type.

Constructors

UnixMountPoint (ManagedPtr UnixMountPoint) |

#### Instances

Instances details

Eq UnixMountPoint Source # |
Instance details Defined in GI.Gio.Structs.UnixMountPoint Methods (==) :: UnixMountPoint -> UnixMountPoint -> Bool # (/=) :: UnixMountPoint -> UnixMountPoint -> Bool #
GBoxed UnixMountPoint Source # |
Instance details Defined in GI.Gio.Structs.UnixMountPoint
TypedObject UnixMountPoint Source # |
Instance details Defined in GI.Gio.Structs.UnixMountPoint Methods glibType :: IO GType Source #
ManagedPtrNewtype UnixMountPoint Source # |
Instance details Defined in GI.Gio.Structs.UnixMountPoint Methods toManagedPtr :: UnixMountPoint -> ManagedPtr UnixMountPoint Source #
IsGValue UnixMountPoint Source # | Convert `UnixMountPoint` to and from `GValue` with `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Structs.UnixMountPoint Methods toGValue :: UnixMountPoint -> IO GValue Source # fromGValue :: GValue -> IO UnixMountPoint Source #
HasParentTypes UnixMountPoint Source # |
Instance details Defined in GI.Gio.Structs.UnixMountPoint
type ParentTypes UnixMountPoint Source # |
Instance details Defined in GI.Gio.Structs.UnixMountPoint type ParentTypes UnixMountPoint = '[] :: [Type]

# Methods

## Overloaded methods

## at

unixMountPointAt Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [Char] | `mountPath`: path for a possible unix mount point.
-> m (Maybe UnixMountPoint, Word64) | Returns: a `UnixMountPoint`, or `Nothing` if no match is found.

Gets a `UnixMountPoint` for a given mount path. If `timeRead` is set, it will be filled with a unix timestamp for checking if the mount points have changed since with `unixMountPointsChangedSince`.

If more mount points have the same mount path, the last matching mount point is returned.

Since: 2.66

## compare

unixMountPointCompare Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mount1`: a `GUnixMount`.
-> UnixMountPoint | `mount2`: a `GUnixMount`.
-> m Int32 | Returns: 1, 0 or -1 if `mount1` is greater than, equal to, or less than `mount2`, respectively.

Compares two unix mount points.

## copy

unixMountPointCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m UnixMountPoint | Returns: a new `UnixMountPoint`

Makes a copy of `mountPoint`.

Since: 2.54

## free

unixMountPointFree Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: unix mount point to free.
-> m () |

Frees a unix mount point.

## getDevicePath

unixMountPointGetDevicePath Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m [Char] | Returns: a string containing the device path.

Gets the device path for a unix mount point.

## getFsType

unixMountPointGetFsType Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m Text | Returns: a string containing the file system type.

Gets the file system type for the mount point.

## getMountPath

unixMountPointGetMountPath Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m [Char] | Returns: a string containing the mount path.

Gets the mount path for a unix mount point.

## getOptions

unixMountPointGetOptions Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m Text | Returns: a string containing the options.

Gets the options for the mount point.

Since: 2.32

## guessCanEject

unixMountPointGuessCanEject Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`
-> m Bool | Returns: `True` if `mountPoint` is deemed to be ejectable.

Guesses whether a Unix mount point can be ejected.

## guessIcon

unixMountPointGuessIcon Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`
-> m Icon | Returns: a `Icon`

Guesses the icon of a Unix mount point.

## guessName

unixMountPointGuessName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`
-> m Text | Returns: A newly allocated string that must be freed with `free`

Guesses the name of a Unix mount point. The result is a translated string.

## guessSymbolicIcon

unixMountPointGuessSymbolicIcon Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`
-> m Icon | Returns: a `Icon`

Guesses the symbolic icon of a Unix mount point.

Since: 2.34

## isLoopback

unixMountPointIsLoopback Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m Bool | Returns: `True` if the mount point is a loopback. `False` otherwise.

Checks if a unix mount point is a loopback device.

## isReadonly

unixMountPointIsReadonly Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m Bool | Returns: `True` if a mount point is read only.

Checks if a unix mount point is read only.

## isUserMountable

unixMountPointIsUserMountable Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> UnixMountPoint | `mountPoint`: a `UnixMountPoint`.
-> m Bool | Returns: `True` if the mount point is user mountable.

Checks if a unix mount point is mountable by the user.