gi-gio-2.0.37: Gio bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
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.

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 GioUnix.MountEntry

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

mount1: first GioUnix.MountEntry to compare

-> UnixMountEntry

mount2: second GioUnix.MountEntry 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 GioUnix.MountEntry

-> m UnixMountEntry

Returns: a new GioUnix.MountEntry

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 GioUnix.MountEntry

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

unixMountEntryFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

-> m () 

Frees a Unix mount.

Since: 2.84

getDevicePath

unixMountEntryGetDevicePath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

-> 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 GioUnix.MountEntry

-> 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: a GioUnix.MountEntry 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 GioUnix.MountEntry

-> m (Maybe Text)

Returns: a string containing the options, or NULL 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 GioUnix.MountPoint.get_options(), but it takes a GioUnix.MountEntry as an argument.

Since: 2.84

getRootPath

unixMountEntryGetRootPath Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

-> m (Maybe Text)

Returns: a string containing the root, or NULL 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 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

mountEntry: a GioUnix.MountEntry

-> m Bool

Returns: true if mountEntry is deemed to be ejectable; false otherwise

Guesses whether a Unix mount entry can be ejected.

Since: 2.84

guessIcon

unixMountEntryGuessIcon Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

-> m Icon

Returns: a Icon

Guesses the icon of a Unix mount entry.

Since: 2.84

guessName

unixMountEntryGuessName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

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

mountEntry: a GioUnix.MountEntry

-> m Bool

Returns: true if mountEntry is deemed to be displayable; false otherwise

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

Since: 2.84

guessSymbolicIcon

unixMountEntryGuessSymbolicIcon Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

-> m Icon

Returns: a Icon

Guesses the symbolic icon of a Unix mount entry.

Since: 2.84

isReadonly

unixMountEntryIsReadonly Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

-> m Bool

Returns: true if mountEntry is read only; false otherwise

Checks if a Unix mount is mounted read only.

Since: 2.84

isSystemInternal

unixMountEntryIsSystemInternal Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> UnixMountEntry

mountEntry: a GioUnix.MountEntry

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