package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Mount/index.html
Module Wrappers.Mount
type t = [ `mount ] Gobject.objval from_gobject : 'a Gobject.obj -> tval unshadow : t -> unitDecrements the shadow count on @mount. Usually used by #GVolumeMonitor implementations when destroying a shadow mount for @mount, see g_mount_is_shadowed() for more information. The caller will need to emit the #GMount::changed signal on @mount manually.
val unmount_with_operation_finish :
t ->
[ `async_result ] Gobject.obj ->
(bool, GError.t) resultFinishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.
val unmount_finish :
t ->
[ `async_result ] Gobject.obj ->
(bool, GError.t) resultFinishes unmounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.
val shadow : t -> unitIncrements the shadow count on @mount. Usually used by #GVolumeMonitor implementations when creating a shadow mount for @mount, see g_mount_is_shadowed() for more information. The caller will need to emit the #GMount::changed signal on @mount manually.
val remount_finish :
t ->
[ `async_result ] Gobject.obj ->
(bool, GError.t) resultFinishes remounting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.
val is_shadowed : t -> boolDetermines if @mount is shadowed. Applications or libraries should avoid displaying @mount in the user interface if it is shadowed.
A mount is said to be shadowed if there exists one or more user visible objects (currently #GMount objects) with a root that is inside the root of @mount.
One application of shadow mounts is when exposing a single file system that is used to address several logical volumes. In this situation, a #GVolumeMonitor implementation would create two #GVolume objects (for example, one for the camera functionality of the device and one for a SD card reader on the device) with activation URIs `gphoto2://usb:001,002/store1/` and `gphoto2://usb:001,002/store2/`. When the underlying mount (with root `gphoto2://usb:001,002/`) is mounted, said #GVolumeMonitor implementation would create two #GMount objects (each with their root matching the corresponding volume activation root) that would shadow the original mount.
The proxy monitor in GVfs 2.26 and later, automatically creates and manage shadow mounts (and shadows the underlying mount) if the activation root on a #GVolume is set.
val guess_content_type_sync :
t ->
bool ->
[ `cancellable | `object_ ] Gobject.obj option ->
(string array, GError.t) resultTries 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(http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) specification for more on x-content types.
This is a synchronous operation and as such may block doing IO; see g_mount_guess_content_type() for the asynchronous version.
val guess_content_type_finish :
t ->
[ `async_result ] Gobject.obj ->
(string array, GError.t) resultFinishes 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.
val get_volume : t -> [ `volume ] Gobject.obj optionGets the volume for the @mount.
val get_uuid : t -> string optionGets the UUID for the @mount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns %NULL if there is no UUID available.
val get_symbolic_icon : t -> [ `icon ] Gobject.objGets the symbolic icon for @mount.
val get_sort_key : t -> string optionGets the sort key for @mount, if any.
val get_root : t -> [ `file ] Gobject.objGets the root directory on @mount.
val get_name : t -> stringGets the name of @mount.
val get_icon : t -> [ `icon ] Gobject.objGets the icon for @mount.
val get_drive : t -> [ `drive ] Gobject.obj optionGets the drive for the @mount.
This is a convenience method for getting the #GVolume and then using that object to get the #GDrive.
val get_default_location : t -> [ `file ] Gobject.objGets the default location of @mount. The default location of the given @mount is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume).
val eject_with_operation_finish :
t ->
[ `async_result ] Gobject.obj ->
(bool, GError.t) resultFinishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.
val eject_finish :
t ->
[ `async_result ] Gobject.obj ->
(bool, GError.t) resultFinishes ejecting a mount. If any errors occurred during the operation, @error will be set to contain the errors and %FALSE will be returned.
val can_unmount : t -> boolChecks if @mount can be unmounted.
val can_eject : t -> boolChecks if @mount can be ejected.
val on_changed :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_pre_unmount :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_idval on_unmounted :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id