Mount
The GMount
interface represents a user-visible mount, such as a mounted file system.
GMount
is a ‘mounted’ filesystem that you can access. Mounted is in quotes because it’s not the same as a UNIX mount, it might be a GVFS mount, but you can still access the files on it if you use GIO.
A GMount
might be associated with a iface@Gio.Volume (such as a USB flash drive) which hosts it.
Unmounting a GMount
instance is an asynchronous operation. For more information about asynchronous operations, see iface@Gio.AsyncResult and class@Gio.Task. To unmount a GMount
instance, first call method@Gio.Mount.unmount_with_operation with (at least) the GMount
instance and a type@Gio.AsyncReadyCallback. The callback will be fired when the operation has resolved (either with success or failure), and a iface@Gio.AsyncResult structure will be passed to the callback. That callback should then call method@Gio.Mount.unmount_with_operation_finish with the GMount
and the iface@Gio.AsyncResult data to see if the operation was completed successfully. If an error
is present when method@Gio.Mount.unmount_with_operation_finish is called, then it will be filled with any error information.
Note, when migrating-gnome-vfs.html, GMount
is the moral equivalent of GnomeVFSVolume
.
Functions
Checks if @mount can be unmounted.
Emitted when the mount has been changed.
This signal may be emitted when the #GMount is about to be unmounted.
This signal is emitted when the #GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.
Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_finish() with the @mount and #GAsyncResult data returned in the @callback.
Finishes ejecting a mount. If any errors occurred during the operation,
Ejects a mount. This is an asynchronous operation, and is finished by calling g_mount_eject_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback.
Finishes ejecting a mount. If any errors occurred during the operation,
Gets the default location of @mount. The default location of the given
Gets the sort key for @mount, if any.
Gets the symbolic icon for @mount.
Tries to guess the type of content stored on @mount. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.
Finishes guessing content types of @mount. If any errors occurred during the operation, @error will be set to contain the errors and false will be returned. In particular, you may get an %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content guessing.
Tries to guess the type of content stored on @mount. Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.
Determines if @mount is shadowed. Applications or libraries should avoid displaying @mount in the user interface if it is shadowed.
Remounts a mount. This is an asynchronous operation, and is finished by calling g_mount_remount_finish() with the @mount and #GAsyncResults data returned in the @callback.
Finishes remounting a mount. If any errors occurred during the operation,
Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_finish() with the @mount and #GAsyncResult data returned in the @callback.
Finishes unmounting a mount. If any errors occurred during the operation,
Unmounts a mount. This is an asynchronous operation, and is finished by calling g_mount_unmount_with_operation_finish() with the @mount and #GAsyncResult data returned in the @callback.
Finishes unmounting a mount. If any errors occurred during the operation,