gi-gio-2.0.34: Gio bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gio.Structs.UnixMountEntry

Description

Defines a Unix mount entry (e.g. /media/cdrom). This corresponds roughly to a mtab entry.

Synopsis

Exported types

newtype UnixMountEntry Source #

Memory-managed wrapper type.

Constructors

UnixMountEntry (ManagedPtr UnixMountEntry) 

Instances

Instances details
Eq UnixMountEntry Source # 
Instance details

Defined in GI.Gio.Structs.UnixMountEntry

GBoxed UnixMountEntry Source # 
Instance details

Defined in GI.Gio.Structs.UnixMountEntry

ManagedPtrNewtype UnixMountEntry Source # 
Instance details

Defined in GI.Gio.Structs.UnixMountEntry

TypedObject UnixMountEntry Source # 
Instance details

Defined in GI.Gio.Structs.UnixMountEntry

Methods

glibType :: IO GType

HasParentTypes UnixMountEntry Source # 
Instance details

Defined in GI.Gio.Structs.UnixMountEntry

IsGValue (Maybe UnixMountEntry) Source #

Convert UnixMountEntry to and from GValue. See toGValue and fromGValue.

Instance details

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 # 
Instance details

Defined in GI.Gio.Structs.UnixMountEntry

type ParentTypes UnixMountEntry = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

compare, copy, free, guessCanEject, guessIcon, guessName, guessShouldDisplay, guessSymbolicIcon, isReadonly, isSystemInternal.

Getters

getDevicePath, getFsType, getMountPath, getOptions, getRootPath.

Setters

None.

at

unixMountEntryAt Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Char]

mountPath: path for a possible unix mount.

-> m (Maybe UnixMountEntry, Word64)

Returns: a UnixMountEntry.

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

mount1: first UnixMountEntry to compare.

-> UnixMountEntry

mount2: second UnixMountEntry to compare.

-> m Int32

Returns: 1, 0 or -1 if mount1 is greater than, equal to, or less than mount2, respectively.

Compares two unix mounts.

Since: 2.84

copy

unixMountEntryCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry.

-> m UnixMountEntry

Returns: a new UnixMountEntry

Makes a copy of mountEntry.

Since: 2.84

for

unixMountEntryFor Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> [Char]

filePath: file path on some unix mount.

-> m (Maybe UnixMountEntry, Word64)

Returns: a UnixMountEntry.

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

unixMountEntryFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry.

-> m () 

Frees a unix mount.

Since: 2.84

getDevicePath

unixMountEntryGetDevicePath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GUnixMount.

-> 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

mountEntry: a GUnixMount.

-> 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

mountEntry: input UnixMountEntry to get the mount path for.

-> m [Char]

Returns: the mount path for mountEntry.

Gets the mount path for a unix mount.

Since: 2.84

getOptions

unixMountEntryGetOptions Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry.

-> m (Maybe Text)

Returns: a string containing the options, or Nothing if not available.

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

mountEntry: a UnixMountEntry.

-> m (Maybe Text)

Returns: a string containing the root, or Nothing if not supported.

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

mountEntry: a UnixMountEntry

-> m Bool

Returns: True if mountEntry is deemed to be ejectable.

Guesses whether a Unix mount can be ejected.

Since: 2.84

guessIcon

unixMountEntryGuessIcon Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry

-> m Icon

Returns: a Icon

Guesses the icon of a Unix mount.

Since: 2.84

guessName

unixMountEntryGuessName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry

-> m Text

Returns: A newly allocated string that must be freed with free

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

Since: 2.84

guessShouldDisplay

unixMountEntryGuessShouldDisplay Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry

-> m Bool

Returns: True if mountEntry is deemed to be displayable.

Guesses whether a Unix mount should be displayed in the UI.

Since: 2.84

guessSymbolicIcon

unixMountEntryGuessSymbolicIcon Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a UnixMountEntry

-> m Icon

Returns: a Icon

Guesses the symbolic icon of a Unix mount.

Since: 2.84

isReadonly

unixMountEntryIsReadonly Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GUnixMount.

-> m Bool

Returns: True if mountEntry is read only.

Checks if a unix mount is mounted read only.

Since: 2.84

isSystemInternal

unixMountEntryIsSystemInternal Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GUnixMount.

-> m Bool

Returns: True if the unix mount is for a system path.

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