Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
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
Eq UnixMountEntry Source # | |
Defined in GI.Gio.Structs.UnixMountEntry Methods (==) :: UnixMountEntry -> UnixMountEntry -> Bool # (/=) :: UnixMountEntry -> UnixMountEntry -> Bool # | |
GBoxed UnixMountEntry Source # | |
Defined in GI.Gio.Structs.UnixMountEntry | |
ManagedPtrNewtype UnixMountEntry Source # | |
Defined in GI.Gio.Structs.UnixMountEntry Methods toManagedPtr :: UnixMountEntry -> ManagedPtr UnixMountEntry # | |
TypedObject UnixMountEntry Source # | |
Defined in GI.Gio.Structs.UnixMountEntry | |
HasParentTypes UnixMountEntry Source # | |
Defined in GI.Gio.Structs.UnixMountEntry | |
IsGValue (Maybe UnixMountEntry) Source # | Convert |
Defined in GI.Gio.Structs.UnixMountEntry Methods gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe UnixMountEntry -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe UnixMountEntry) # | |
type ParentTypes UnixMountEntry Source # | |
Defined in GI.Gio.Structs.UnixMountEntry |
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 GioUnix.MountEntry
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
GioUnix.mount_entries_changed_since
.
If more mounts have the same mount path, the last matching mount is returned.
This will return NULL
if there is no mount point at mountPath
.
Since: 2.84
compare
unixMountEntryCompare Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> UnixMountEntry |
|
-> m Int32 | Returns: |
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 GioUnix.MountEntry
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
GioUnix.mount_entries_changed_since
.
If more mounts have the same mount path, the last matching mount is returned.
This will return NULL
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 GioUnix.MountPoint.get_options()
, but it takes
a GioUnix.MountEntry
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 a 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: true if |
Guesses whether a Unix mount entry 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 entry.
Since: 2.84
guessName
unixMountEntryGuessName Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Text | Returns: a newly allocated translated string |
Guesses the name of a Unix mount entry.
The result is a translated string.
Since: 2.84
guessShouldDisplay
unixMountEntryGuessShouldDisplay Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: true if |
Guesses whether a Unix mount entry 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 entry.
Since: 2.84
isReadonly
unixMountEntryIsReadonly Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: true if |
Checks if a Unix mount is mounted read only.
Since: 2.84
isSystemInternal
unixMountEntryIsSystemInternal Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> UnixMountEntry |
|
-> m Bool | Returns: true if the Unix mount is for a system path; false otherwise |
Checks if a Unix mount is a system mount.
This is the Boolean OR of
GioUnix.is_system_fs_type
, GioUnix.is_system_device_path
and
GioUnix.is_mount_path_system_internal
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