Namespace

GioUnix – 2.0

Unix-specific APIs in Gio

Version2.83.0
AuthorsGLib Development Team
LicenseLGPL-2.1-or-later
Websitehttps://www.gtk.org
Sourcehttps://gitlab.gnome.org/GNOME/glib/

Build

C headers/builds/GNOME/glib/gio/gdesktopappinfo.h, /builds/GNOME/glib/gio/gfiledescriptorbased.h, /builds/GNOME/glib/gio/gunixfdmessage.h, /builds/GNOME/glib/gio/gunixinputstream.h, /builds/GNOME/glib/gio/gunixmounts.h, /builds/GNOME/glib/gio/gunixoutputstream.h, gio/gio.h
pkg-config filesgio-unix-2.0

Dependencies

GLib—2.0 The base utility library
Browse documentation
GModule—2.0 Portable API for dynamically loading modules
Browse documentation
GObject—2.0 The base type system library
Browse documentation
Gio—2.0 A library of useful classes for I/O, networking and IPC
Browse documentation

Additional documentation

Classes

DesktopAppInfo

GDesktopAppInfo is an implementation of GAppInfo based on desktop files.

FDMessage

This GSocketControlMessage contains a GUnixFDList. It may be sent using g_socket_send_message() and received using g_socket_receive_message() over UNIX sockets (ie: sockets in the G_SOCKET_FAMILY_UNIX family). The file descriptors are copied between processes by the kernel.

InputStream

GUnixInputStream implements GInputStream for reading from a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will use poll() to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.).

MountMonitor

Watches GUnixMounts for changes.

OutputStream

GUnixOutputStream implements GOutputStream for writing to a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will use poll() to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.).

Interfaces

DesktopAppInfoLookup

GDesktopAppInfoLookup is an opaque data structure and can only be accessed using the following functions.

deprecated: 2.28 

FileDescriptorBased

GFileDescriptorBased is an interface for file descriptor based IO.

since: 2.24

Structs

MountEntry

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

MountPoint

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

Callbacks

DesktopAppLaunchCallback

During invocation, g_desktop_app_info_launch_uris_as_manager() may create one or more child processes. This callback is invoked once for each, providing the process ID.

Functions

is_mount_path_system_internal

Determines if mount_path is considered an implementation of the OS. This is primarily used for hiding mountable and mounted volumes that only are used in the OS and has little to no relevance to the casual user.

is_system_device_path

Determines if device_path is considered a block device path which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux /proc filesystem.

since: 2.56

is_system_fs_type

Determines if fs_type is considered a type of file system which is only used in implementation of the OS. This is primarily used for hiding mounted volumes that are intended as APIs for programs to read, and system administrators at a shell; rather than something that should, for example, appear in a GUI. For example, the Linux /proc filesystem.

since: 2.56

mount_at

Gets a GUnixMountEntry 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 g_unix_mount_entries_changed_since().

deprecated: 2.84 

mount_compare

Compares two unix mounts.

deprecated: 2.84 

mount_copy

Makes a copy of mount_entry.

deprecated: 2.84 since: 2.54

mount_entries_changed_since

Checks if the unix mounts have changed since a given unix time.

mount_entries_get

Gets a GList of GUnixMountEntry containing the unix mounts. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mount_entries_changed_since().

unstable since: 2.84

mount_entries_get_from_file

Gets an array of GUnixMountEntrys containing the Unix mounts listed in table_path.

unstable since: 2.84

mount_for

Gets a GUnixMountEntry 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 g_unix_mount_entries_changed_since().

deprecated: 2.84 since: 2.52

mount_free

Frees a unix mount.

deprecated: 2.84 

mount_get_device_path

Gets the device path for a unix mount.

deprecated: 2.84 

mount_get_fs_type

Gets the filesystem type for the unix mount.

deprecated: 2.84 

mount_get_mount_path

Gets the mount path for a unix mount.

deprecated: 2.84 

mount_get_options

Gets a comma-separated list of mount options for the unix mount. For example, rw,relatime,seclabel,data=ordered.

deprecated: 2.84 since: 2.58

mount_get_root_path

Gets the root of the mount within the filesystem. This is useful e.g. for mounts created by bind operation, or btrfs subvolumes.

deprecated: 2.84 since: 2.60

mount_guess_can_eject

Guesses whether a Unix mount can be ejected.

deprecated: 2.84 

mount_guess_icon

Guesses the icon of a Unix mount.

deprecated: 2.84 

mount_guess_name

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

deprecated: 2.84 

mount_guess_should_display

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

deprecated: 2.84 

mount_guess_symbolic_icon

Guesses the symbolic icon of a Unix mount.

deprecated: 2.84 since: 2.34

mount_is_readonly

Checks if a unix mount is mounted read only.

deprecated: 2.84 

mount_is_system_internal

Checks if a Unix mount is a system mount. This is the Boolean OR of g_unix_is_system_fs_type(), g_unix_is_system_device_path() and g_unix_is_mount_path_system_internal() on mount_entry’s properties.

deprecated: 2.84 

mount_points_changed_since

Checks if the unix mount points have changed since a given unix time.

mount_points_get

Gets a GList of GUnixMountPoint containing the unix mount points. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mount_points_changed_since().

mount_points_get_from_file

Gets an array of GUnixMountPoints containing the Unix mount points listed in table_path.

since: 2.82

mounts_changed_since

Checks if the unix mounts have changed since a given unix time.

deprecated: 2.84 

mounts_get

Gets a GList of GUnixMountEntry containing the unix mounts. If time_read is set, it will be filled with the mount timestamp, allowing for checking if the mounts have changed with g_unix_mount_entries_changed_since().

deprecated: 2.84 

mounts_get_from_file

Gets an array of GUnixMountEntrys containing the Unix mounts listed in table_path.

deprecated: 2.84 since: 2.82

Constants

DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME

Extension point for default handler to URI association. See [Extending GIO][extending-gio].

deprecated: 2.28