package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Mount

type t = [ `mount ] Gobject.obj
val from_gobject : 'a Gobject.obj -> t
val unshadow : t -> unit

Decrements 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) result

Finishes 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) result

Finishes 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 -> unit

Increments 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) result

Finishes 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 -> bool

Determines 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) result

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(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) result

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.

val get_volume : t -> [ `volume ] Gobject.obj option

Gets the volume for the @mount.

val get_uuid : t -> string option

Gets 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.obj

Gets the symbolic icon for @mount.

val get_sort_key : t -> string option

Gets the sort key for @mount, if any.

val get_root : t -> [ `file ] Gobject.obj

Gets the root directory on @mount.

val get_name : t -> string

Gets the name of @mount.

val get_icon : t -> [ `icon ] Gobject.obj

Gets the icon for @mount.

val get_drive : t -> [ `drive ] Gobject.obj option

Gets 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.obj

Gets 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) result

Finishes 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) result

Finishes 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 -> bool

Checks if @mount can be unmounted.

val can_eject : t -> bool

Checks if @mount can be ejected.

val on_changed : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_pre_unmount : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_unmounted : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id