Class (GI Struct)

GioUnix-2.0GioUnixMountEntryAbstract

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

Index

Constructors

Properties

$gtype: GType<MountEntry>

Methods

  • Gets the filesystem type for the Unix mount.

    Returns string

    a string containing the file system type

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

    Returns string | null

    a string containing the root, or NULL if not supported

  • Guesses whether a Unix mount entry can be ejected.

    Returns boolean

    true if mount_entry is deemed to be ejectable; false otherwise

  • Guesses the name of a Unix mount entry.

    The result is a translated string.

    Returns string

    a newly allocated translated string

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

    Returns boolean

    true if mount_entry is deemed to be displayable; false otherwise

  • Checks if a Unix mount is mounted read only.

    Returns boolean

    true if mount_entry is read only; false otherwise

  • Gets a GioUnix.MountEntry for a given mount path.

    If time_read 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 mount_path.

    Parameters

    • mount_path: string

      path for a possible Unix mount

    Returns [MountEntry | null, number]

  • Gets a GioUnix.MountEntry for a given file path.

    If time_read 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 file_path doesn’t exist or there is an I/O error.

    Parameters

    • file_path: string

      file path on some Unix mount

    Returns [MountEntry | null, number]