Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.Gio.Structs.UnixMountEntry
Description
Defines a Unix mount entry (e.g. /media/cdrom
).
This corresponds roughly to a mtab entry.
Synopsis
- newtype UnixMountEntry = UnixMountEntry (ManagedPtr UnixMountEntry)
- unixMountEntryAt :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe UnixMountEntry, Word64)
- unixMountEntryCompare :: (HasCallStack, MonadIO m) => UnixMountEntry -> UnixMountEntry -> m Int32
- unixMountEntryCopy :: (HasCallStack, MonadIO m) => UnixMountEntry -> m UnixMountEntry
- unixMountEntryFor :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe UnixMountEntry, Word64)
- unixMountEntryFree :: (HasCallStack, MonadIO m) => UnixMountEntry -> m ()
- unixMountEntryGetDevicePath :: (HasCallStack, MonadIO m) => UnixMountEntry -> m [Char]
- unixMountEntryGetFsType :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Text
- unixMountEntryGetMountPath :: (HasCallStack, MonadIO m) => UnixMountEntry -> m [Char]
- unixMountEntryGetOptions :: (HasCallStack, MonadIO m) => UnixMountEntry -> m (Maybe Text)
- unixMountEntryGetRootPath :: (HasCallStack, MonadIO m) => UnixMountEntry -> m (Maybe Text)
- unixMountEntryGuessCanEject :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool
- unixMountEntryGuessIcon :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Icon
- unixMountEntryGuessName :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Text
- unixMountEntryGuessShouldDisplay :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool
- unixMountEntryGuessSymbolicIcon :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Icon
- unixMountEntryIsReadonly :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool
- unixMountEntryIsSystemInternal :: (HasCallStack, MonadIO m) => UnixMountEntry -> m Bool
Exported types
newtype UnixMountEntry Source #
Memory-managed wrapper type.
Constructors
UnixMountEntry (ManagedPtr UnixMountEntry) |
Instances
Methods
Click to display all available methods, including inherited ones
Methods
compare, copy, free, guessCanEject, guessIcon, guessName, guessShouldDisplay, guessSymbolicIcon, isReadonly, isSystemInternal.
Getters
getDevicePath, getFsType, getMountPath, getOptions, getRootPath.
Setters
None.
at
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Char] |
|
-> m (Maybe UnixMountEntry, Word64) | Returns: a |
Gets a UnixMountEntry
for a given mount path. If timeRead
is set, it will be filled with a unix timestamp for checking
if the mounts have changed since with unixMountEntriesChangedSince
.
If more mounts have the same mount path, the last matching mount is returned.
This will return Nothing
if there is no mount point at mountPath
.
Since: 2.84
compare
unixMountEntryCompare Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> UnixMountEntry |
|
-> m Int32 | Returns: 1, 0 or -1 if |
Compares two unix mounts.
Since: 2.84
copy
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m UnixMountEntry | Returns: a new |
Makes a copy of mountEntry
.
Since: 2.84
for
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Char] |
|
-> m (Maybe UnixMountEntry, Word64) | Returns: a |
Gets a UnixMountEntry
for a given file path. If timeRead
is set, it will be filled with a unix timestamp for checking
if the mounts have changed since with unixMountEntriesChangedSince
.
If more mounts have the same mount path, the last matching mount is returned.
This will return Nothing
if looking up the mount entry fails, if
filePath
doesn’t exist or there is an I/O error.
Since: 2.84
free
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m () |
Frees a unix mount.
Since: 2.84
getDevicePath
unixMountEntryGetDevicePath Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m [Char] | Returns: a string containing the device path. |
Gets the device path for a unix mount.
Since: 2.84
getFsType
unixMountEntryGetFsType Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Text | Returns: a string containing the file system type. |
Gets the filesystem type for the unix mount.
Since: 2.84
getMountPath
unixMountEntryGetMountPath Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m [Char] | Returns: the mount path for |
Gets the mount path for a unix mount.
Since: 2.84
getOptions
unixMountEntryGetOptions Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m (Maybe Text) | Returns: a string containing the options, or |
Gets a comma-separated list of mount options for the unix mount. For example,
rw,relatime,seclabel,data=ordered
.
This is similar to unixMountPointGetOptions
, but it takes
a UnixMountEntry
as an argument.
Since: 2.84
getRootPath
unixMountEntryGetRootPath Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m (Maybe Text) | Returns: a string containing the root, or |
Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.
For example, the root path is equal to "/" for mount created by "mount /dev/sda1 /mnt/foo" and "/bar" for "mount --bind /mnt/foo/bar /mnt/bar".
Since: 2.84
guessCanEject
unixMountEntryGuessCanEject Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: |
Guesses whether a Unix mount can be ejected.
Since: 2.84
guessIcon
unixMountEntryGuessIcon Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Icon | Returns: a |
Guesses the icon of a Unix mount.
Since: 2.84
guessName
unixMountEntryGuessName Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Text | Returns: A newly allocated string that must
be freed with |
Guesses the name of a Unix mount. The result is a translated string.
Since: 2.84
guessShouldDisplay
unixMountEntryGuessShouldDisplay Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: |
Guesses whether a Unix mount should be displayed in the UI.
Since: 2.84
guessSymbolicIcon
unixMountEntryGuessSymbolicIcon Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Icon | Returns: a |
Guesses the symbolic icon of a Unix mount.
Since: 2.84
isReadonly
unixMountEntryIsReadonly Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: |
Checks if a unix mount is mounted read only.
Since: 2.84
isSystemInternal
unixMountEntryIsSystemInternal Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: |
Checks if a Unix mount is a system mount. This is the Boolean OR of
unixIsSystemFsType
, unixIsSystemDevicePath
and
unixIsMountPathSystemInternal
on mountEntry
’s properties.
The definition of what a ‘system’ mount entry is may change over time as new file system types and device paths are ignored.
Since: 2.84