Gio.UnixMountPoint

Fields

None

Methods

class

at (mount_path)

compare (mount2)

copy ()

free ()

get_device_path ()

get_fs_type ()

get_mount_path ()

get_options ()

guess_can_eject ()

guess_icon ()

guess_name ()

guess_symbolic_icon ()

is_loopback ()

is_readonly ()

is_user_mountable ()

Details

class Gio.UnixMountPoint

Defines a Unix mount point (e.g. /dev). This corresponds roughly to a fstab entry.

classmethod at(mount_path)[source]
Parameters:

mount_path (str) – path for a possible unix mount point.

Returns:

a Gio.UnixMountPoint, or None if no match is found.

time_read:

guint64 to contain a timestamp.

Return type:

(Gio.UnixMountPoint or None, time_read: int)

Gets a Gio.UnixMountPoint for a given mount path. If time_read is set, it will be filled with a unix timestamp for checking if the mount points have changed since with Gio.unix_mount_points_changed_since().

If more mount points have the same mount path, the last matching mount point is returned.

New in version 2.66.

compare(mount2)[source]
Parameters:

mount2 (Gio.UnixMountPoint) – a #GUnixMount.

Returns:

1, 0 or -1 if self is greater than, equal to, or less than mount2, respectively.

Return type:

int

Compares two unix mount points.

copy()[source]
Returns:

a new Gio.UnixMountPoint

Return type:

Gio.UnixMountPoint

Makes a copy of self.

New in version 2.54.

free()[source]

Frees a unix mount point.

get_device_path()[source]
Returns:

a string containing the device path.

Return type:

str

Gets the device path for a unix mount point.

get_fs_type()[source]
Returns:

a string containing the file system type.

Return type:

str

Gets the file system type for the mount point.

get_mount_path()[source]
Returns:

a string containing the mount path.

Return type:

str

Gets the mount path for a unix mount point.

get_options()[source]
Returns:

a string containing the options.

Return type:

str or None

Gets the options for the mount point.

New in version 2.32.

guess_can_eject()[source]
Returns:

True if self is deemed to be ejectable.

Return type:

bool

Guesses whether a Unix mount point can be ejected.

guess_icon()[source]
Returns:

a Gio.Icon

Return type:

Gio.Icon

Guesses the icon of a Unix mount point.

guess_name()[source]
Returns:

A newly allocated string that must be freed with GLib.free()

Return type:

str

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

guess_symbolic_icon()[source]
Returns:

a Gio.Icon

Return type:

Gio.Icon

Guesses the symbolic icon of a Unix mount point.

New in version 2.34.

is_loopback()[source]
Returns:

True if the mount point is a loopback. False otherwise.

Return type:

bool

Checks if a unix mount point is a loopback device.

is_readonly()[source]
Returns:

True if a mount point is read only.

Return type:

bool

Checks if a unix mount point is read only.

is_user_mountable()[source]
Returns:

True if the mount point is user mountable.

Return type:

bool

Checks if a unix mount point is mountable by the user.