Top |
Functions
Description
Routines for managing mounted UNIX mount points and paths.
Note that <gio/gunixmounts.h>
belongs to the UNIX-specific GIO
interfaces, thus you have to use the gio-unix-2.0.pc
pkg-config
file when using it.
Functions
g_unix_mount_compare ()
gint g_unix_mount_compare (GUnixMountEntry *mount1
,GUnixMountEntry *mount2
);
Compares two unix mounts.
g_unix_mount_get_mount_path ()
const char *
g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry
);
Gets the mount path for a unix mount.
g_unix_mount_get_device_path ()
const char *
g_unix_mount_get_device_path (GUnixMountEntry *mount_entry
);
Gets the device path for a unix mount.
g_unix_mount_get_fs_type ()
const char *
g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry
);
Gets the filesystem type for the unix mount.
g_unix_mount_is_readonly ()
gboolean
g_unix_mount_is_readonly (GUnixMountEntry *mount_entry
);
Checks if a unix mount is mounted read only.
g_unix_mount_is_system_internal ()
gboolean
g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry
);
Checks if a unix mount is a system path.
g_unix_mount_guess_icon ()
GIcon *
g_unix_mount_guess_icon (GUnixMountEntry *mount_entry
);
Guesses the icon of a Unix mount.
g_unix_mount_guess_symbolic_icon ()
GIcon *
g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry
);
Guesses the symbolic icon of a Unix mount.
Since 2.34
g_unix_mount_guess_name ()
char *
g_unix_mount_guess_name (GUnixMountEntry *mount_entry
);
Guesses the name of a Unix mount. The result is a translated string.
g_unix_mount_guess_can_eject ()
gboolean
g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry
);
Guesses whether a Unix mount can be ejected.
g_unix_mount_guess_should_display ()
gboolean
g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry
);
Guesses whether a Unix mount should be displayed in the UI.
g_unix_mount_point_free ()
void
g_unix_mount_point_free (GUnixMountPoint *mount_point
);
Frees a unix mount point.
g_unix_mount_point_compare ()
gint g_unix_mount_point_compare (GUnixMountPoint *mount1
,GUnixMountPoint *mount2
);
Compares two unix mount points.
g_unix_mount_point_get_mount_path ()
const char *
g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point
);
Gets the mount path for a unix mount point.
g_unix_mount_point_get_device_path ()
const char *
g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point
);
Gets the device path for a unix mount point.
g_unix_mount_point_get_fs_type ()
const char *
g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point
);
Gets the file system type for the mount point.
g_unix_mount_point_get_options ()
const char *
g_unix_mount_point_get_options (GUnixMountPoint *mount_point
);
Gets the options for the mount point.
Since 2.32
g_unix_mount_point_is_readonly ()
gboolean
g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point
);
Checks if a unix mount point is read only.
g_unix_mount_point_is_user_mountable ()
gboolean
g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point
);
Checks if a unix mount point is mountable by the user.
g_unix_mount_point_is_loopback ()
gboolean
g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point
);
Checks if a unix mount point is a loopback device.
g_unix_mount_point_guess_icon ()
GIcon *
g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point
);
Guesses the icon of a Unix mount point.
g_unix_mount_point_guess_symbolic_icon ()
GIcon *
g_unix_mount_point_guess_symbolic_icon
(GUnixMountPoint *mount_point
);
Guesses the symbolic icon of a Unix mount point.
Since 2.34
g_unix_mount_point_guess_name ()
char *
g_unix_mount_point_guess_name (GUnixMountPoint *mount_point
);
Guesses the name of a Unix mount point. The result is a translated string.
g_unix_mount_point_guess_can_eject ()
gboolean
g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point
);
Guesses whether a Unix mount point can be ejected.
g_unix_mount_points_get ()
GList *
g_unix_mount_points_get (guint64 *time_read
);
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()
.
g_unix_mounts_get ()
GList *
g_unix_mounts_get (guint64 *time_read
);
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_mounts_changed_since()
.
g_unix_mount_at ()
GUnixMountEntry * g_unix_mount_at (const char *mount_path
,guint64 *time_read
);
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_mounts_changed_since()
.
g_unix_mounts_changed_since ()
gboolean
g_unix_mounts_changed_since (guint64 time
);
Checks if the unix mounts have changed since a given unix time.
g_unix_mount_points_changed_since ()
gboolean
g_unix_mount_points_changed_since (guint64 time
);
Checks if the unix mount points have changed since a given unix time.
g_unix_mount_monitor_new ()
GUnixMountMonitor *
g_unix_mount_monitor_new (void
);
Gets a new GUnixMountMonitor. The default rate limit for which the
monitor will report consecutive changes for the mount and mount
point entry files is the default for a GFileMonitor. Use
g_unix_mount_monitor_set_rate_limit()
to change this.
g_unix_mount_monitor_set_rate_limit ()
void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor
,int limit_msec
);
Sets the rate limit to which the mount_monitor
will report
consecutive change events to the mount and mount point entry files.
Since 2.18
g_unix_is_mount_path_system_internal ()
gboolean
g_unix_is_mount_path_system_internal (const char *mount_path
);
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.
Types and Values
GUnixMountPoint
typedef struct _GUnixMountPoint GUnixMountPoint;
Defines a Unix mount point (e.g. <filename>/dev</filename>). This corresponds roughly to a fstab entry.
GUnixMountEntry
typedef struct _GUnixMountEntry GUnixMountEntry;
Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>). This corresponds roughly to a mtab entry.
Signal Details
The “mountpoints-changed”
signal
void user_function (GUnixMountMonitor *monitor, gpointer user_data)
Emitted when the unix mount points have changed.
Parameters
monitor |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
The “mounts-changed”
signal
void user_function (GUnixMountMonitor *monitor, gpointer user_data)
Emitted when the unix mounts have changed.
Parameters
monitor |
the object on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last