Gio.UnixMountEntry¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gio.UnixMountEntry¶
Defines a Unix mount entry (e.g.
/media/cdrom
). This corresponds roughly to a mtab entry.- classmethod at(mount_path)[source]¶
- Parameters:
mount_path (
str
) – path for a possible Unix mount- Returns:
a [struct`GioUnix`.MountEntry]
- time_read:
return location for a timestamp
- Return type:
(
Gio.UnixMountEntry
orNone
, time_read:int
)
Gets a [struct`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 [func`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.New in version 2.84.
- classmethod for_(file_path)[source]¶
- Parameters:
file_path (
str
) – file path on some Unix mount- Returns:
a [struct`GioUnix`.MountEntry]
- time_read:
return location for a timestamp
- Return type:
(
Gio.UnixMountEntry
orNone
, time_read:int
)
Gets a [struct`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 [func`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.New in version 2.84.
- compare(mount2)[source]¶
- Parameters:
mount2 (
Gio.UnixMountEntry
) – second [struct`GioUnix`.MountEntry] to compare- Returns:
1
,0
or-1
if self is greater than, equal to, or less than mount2, respectively- Return type:
Compares two Unix mounts.
New in version 2.84.
- copy()[source]¶
- Returns:
a new [struct`GioUnix`.MountEntry]
- Return type:
Makes a copy of self.
New in version 2.84.
- get_device_path()[source]¶
- Returns:
a string containing the device path
- Return type:
Gets the device path for a Unix mount.
New in version 2.84.
- get_fs_type()[source]¶
- Returns:
a string containing the file system type
- Return type:
Gets the filesystem type for the Unix mount.
New in version 2.84.
- get_mount_path()[source]¶
- Returns:
the mount path for self
- Return type:
Gets the mount path for a Unix mount.
New in version 2.84.
- get_options()[source]¶
-
Gets a comma separated list of mount options for the Unix mount.
For example:
rw,relatime,seclabel,data=ordered
.This is similar to [func`GioUnix`.MountPoint.get_options], but it takes a [struct`GioUnix`.MountEntry] as an argument.
New in version 2.84.
- get_root_path()[source]¶
-
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 bymount /dev/sda1 /mnt/foo
and/bar
formount --bind /mnt/foo/bar /mnt/bar
.New in version 2.84.
- guess_can_eject()[source]¶
- Returns:
true if self is deemed to be ejectable; false otherwise
- Return type:
Guesses whether a Unix mount entry can be ejected.
New in version 2.84.
- guess_icon()[source]¶
- Returns:
a [iface`Gio`.Icon]
- Return type:
Guesses the icon of a Unix mount entry.
New in version 2.84.
- guess_name()[source]¶
- Returns:
a newly allocated translated string
- Return type:
Guesses the name of a Unix mount entry.
The result is a translated string.
New in version 2.84.
- guess_should_display()[source]¶
- Returns:
true if self is deemed to be displayable; false otherwise
- Return type:
Guesses whether a Unix mount entry should be displayed in the UI.
New in version 2.84.
- guess_symbolic_icon()[source]¶
- Returns:
a [iface`Gio`.Icon]
- Return type:
Guesses the symbolic icon of a Unix mount entry.
New in version 2.84.
- is_readonly()[source]¶
- Returns:
true if self is read only; false otherwise
- Return type:
Checks if a Unix mount is mounted read only.
New in version 2.84.
- is_system_internal()[source]¶
- Returns:
true if the Unix mount is for a system path; false otherwise
- Return type:
Checks if a Unix mount is a system mount.
This is the Boolean OR of [func`GioUnix`.is_system_fs_type], [func`GioUnix`.is_system_device_path] and [func`GioUnix`.is_mount_path_system_internal] on self’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.
New in version 2.84.