2.23 <GMount>

Interface: <GMount>

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 <GVolume> (such as a USB flash drive) which hosts it.

Unmounting a <GMount> instance is an asynchronous operation. For more information about asynchronous operations, see <GAsyncResult> and <GTask>. To unmount a <GMount> instance, first call mount:unmount-with-operation with (at least) the <GMount> instance and a GAsyncReadyCallback. The callback will be fired when the operation has resolved (either with success or failure), and a <GAsyncResult> structure will be passed to the callback. That callback should then call mount:unmount-with-operation-finish? with the <GMount> and the <GAsyncResult> data to see if the operation was completed successfully. If an error is present when mount:unmount-with-operation-finish? is called, then it will be filled with any error information.

Note, when porting from GnomeVFS, <GMount> is the moral equivalent of GnomeVFSVolume.

Procedures

Method: mount:can-eject? self ⇒ %return
Method: can-eject? self ⇒ %return

Checks if self can be ejected.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a boolean.

#t if the self can be ejected.

Method: mount:can-unmount? self ⇒ %return
Method: can-unmount? self ⇒ %return

Checks if self can be unmounted.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a boolean.

#t if the self can be unmounted.

Method: mount:eject self flags [cancellable] [callback]
Method: eject self flags [cancellable] [callback]

Ejects a mount. This is an asynchronous operation, and is finished by calling mount:eject-finish? with the self and <GAsyncResult> data returned in the callback.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Method: mount:eject-finish? self result ⇒ %return
Method: eject-finish? self result ⇒ %return

Finishes ejecting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully ejected. #f otherwise.

Method: mount:eject-with-operation self flags [mount-operation] [cancellable] [callback]
Method: eject-with-operation self flags [mount-operation] [cancellable] [callback]

Ejects a mount. This is an asynchronous operation, and is finished by calling mount:eject-with-operation-finish? with the self and <GAsyncResult> data returned in the callback.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Method: mount:eject-with-operation-finish? self result ⇒ %return
Method: eject-with-operation-finish? self result ⇒ %return

Finishes ejecting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully ejected. #f otherwise.

Method: mount:get-default-location self ⇒ %return
Method: get-default-location self ⇒ %return

Gets the default location of self. The default location of the given self is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume).

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GFile>.

a <GFile>. The returned object should be unreffed with object:unref when no longer needed.

Method: mount:get-drive self ⇒ %return
Method: get-drive self ⇒ %return

Gets the drive for the self.

This is a convenience method for getting the <GVolume> and then using that object to get the <GDrive>.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GDrive>, or #f.

a <GDrive> or #f if self is not associated with a volume or a drive. The returned object should be unreffed with object:unref when no longer needed.

Method: mount:get-icon self ⇒ %return
Method: get-icon self ⇒ %return

Gets the icon for self.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GIcon>.

a <GIcon>. The returned object should be unreffed with object:unref when no longer needed.

Method: mount:get-name self ⇒ %return
Method: get-name self ⇒ %return

Gets the name of self.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a string.

the name for the given self. The returned string should be freed with byte-array:free when no longer needed.

Method: mount:get-root self ⇒ %return
Method: get-root self ⇒ %return

Gets the root directory on self.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GFile>.

a <GFile>. The returned object should be unreffed with object:unref when no longer needed.

Method: mount:get-sort-key self ⇒ %return
Method: get-sort-key self ⇒ %return

Gets the sort key for self, if any.

self

Passed: a <GMount>.

A <GMount>.

%return

Returned: a string, or #f.

Sorting key for self or #f if no such key is available.

Method: mount:get-symbolic-icon self ⇒ %return
Method: get-symbolic-icon self ⇒ %return

Gets the symbolic icon for self.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GIcon>.

a <GIcon>. The returned object should be unreffed with object:unref when no longer needed.

Method: mount:get-uuid self ⇒ %return
Method: get-uuid self ⇒ %return

Gets the UUID for the self. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns #f if there is no UUID available.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a string, or #f.

the UUID for self or #f if no UUID can be computed. The returned string should be freed with byte-array:free when no longer needed.

Method: mount:get-volume self ⇒ %return
Method: get-volume self ⇒ %return

Gets the volume for the self.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GVolume>, or #f.

a <GVolume> or #f if self is not associated with a volume. The returned object should be unreffed with object:unref when no longer needed.

Method: mount:guess-content-type self force-rescan [cancellable] [callback]
Method: guess-content-type self force-rescan [cancellable] [callback]

Tries to guess the type of content stored on self. 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.

This is an asynchronous operation (see mount:guess-content-type-sync for the synchronous version), and is finished by calling mount:guess-content-type-finish with the self and <GAsyncResult> data returned in the callback.

self

Passed: a <GMount>.

a <GMount>

force-rescan

Passed: a boolean.

Whether to force a rescan of the content. Otherwise a cached result will be used if available

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback

Method: mount:guess-content-type-finish self result ⇒ %return
Method: guess-content-type-finish self result ⇒ %return

Finishes guessing content types of self. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned. In particular, you may get an not-supported if the mount does not support content guessing.

self

Passed: a <GMount>.

a <GMount>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a vector, each a string.

a #f-terminated array of content types or #f on error. Caller should free this array with strfreev when done with it.

Method: mount:guess-content-type-sync self force-rescan [cancellable] ⇒ %return
Method: guess-content-type-sync self force-rescan [cancellable] ⇒ %return

Tries to guess the type of content stored on self. 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.

This is a synchronous operation and as such may block doing IO; see mount:guess-content-type for the asynchronous version.

self

Passed: a <GMount>.

a <GMount>

force-rescan

Passed: a boolean.

Whether to force a rescan of the content. Otherwise a cached result will be used if available

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore

%return

Returned: a vector, each a string.

a #f-terminated array of content types or #f on error. Caller should free this array with strfreev when done with it.

Method: mount:is-shadowed? self ⇒ %return
Method: is-shadowed? self ⇒ %return

Determines if self is shadowed. Applications or libraries should avoid displaying self 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 self.

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.

self

Passed: a <GMount>.

A <GMount>.

%return

Returned: a boolean.

#t if self is shadowed.

Method: mount:remount self flags [mount-operation] [cancellable] [callback]
Method: remount self flags [mount-operation] [cancellable] [callback]

Remounts a mount. This is an asynchronous operation, and is finished by calling mount:remount-finish? with the self and GAsyncResults data returned in the callback.

Remounting is useful when some setting affecting the operation of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountMountFlags>, or a list of its symbols, or one of them.

flags affecting the operation

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Method: mount:remount-finish? self result ⇒ %return
Method: remount-finish? self result ⇒ %return

Finishes remounting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully remounted. #f otherwise.

Method: mount:shadow self
Method: shadow self

Increments the shadow count on self. Usually used by <GVolumeMonitor> implementations when creating a shadow mount for self, see mount:is-shadowed? for more information. The caller will need to emit the mount:changed signal on self manually.

self

Passed: a <GMount>.

A <GMount>.

Method: mount:unmount self flags [cancellable] [callback]
Method: unmount self flags [cancellable] [callback]

Unmounts a mount. This is an asynchronous operation, and is finished by calling mount:unmount-finish? with the self and <GAsyncResult> data returned in the callback.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the operation

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Method: mount:unmount-finish? self result ⇒ %return
Method: unmount-finish? self result ⇒ %return

Finishes unmounting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully unmounted. #f otherwise.

Method: mount:unmount-with-operation self flags [mount-operation] [cancellable] [callback]
Method: unmount-with-operation self flags [mount-operation] [cancellable] [callback]

Unmounts a mount. This is an asynchronous operation, and is finished by calling mount:unmount-with-operation-finish? with the self and <GAsyncResult> data returned in the callback.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the operation

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Method: mount:unmount-with-operation-finish? self result ⇒ %return
Method: unmount-with-operation-finish? self result ⇒ %return

Finishes unmounting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully unmounted. #f otherwise.

Method: mount:unshadow self
Method: unshadow self

Decrements the shadow count on self. Usually used by <GVolumeMonitor> implementations when destroying a shadow mount for self, see mount:is-shadowed? for more information. The caller will need to emit the mount:changed signal on self manually.

self

Passed: a <GMount>.

A <GMount>.

Signals

Signal: mount:changed

Connect a handler with (connect object mount:changed handler). It is called as (handler self).

Emitted when the mount has been changed.

self

Passed: a <GMount>.

Signal: mount:pre-unmount

Connect a handler with (connect object mount:pre-unmount handler). It is called as (handler self).

This signal may be emitted when the <GMount> is about to be unmounted.

This signal depends on the backend and is only emitted if GIO was used to unmount.

self

Passed: a <GMount>.

Signal: mount:unmounted

Connect a handler with (connect object mount:unmounted handler). It is called as (handler self).

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.

self

Passed: a <GMount>.

Virtual methods

Virtual method: mount:do-can-eject implementor self ⇒ %return

Checks if self can be ejected.

To override it in a new class, give register-type #:vfuncs `((can-eject . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a boolean.

#t if the self can be ejected.

Virtual method: mount:do-can-unmount implementor self ⇒ %return

Checks if self can be unmounted.

To override it in a new class, give register-type #:vfuncs `((can-unmount . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a boolean.

#t if the self can be unmounted.

Virtual method: mount:do-changed implementor self

Changed signal that is emitted when the mount’s state has changed.

To override it in a new class, give register-type #:vfuncs `((changed . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

Virtual method: mount:do-eject implementor self flags [cancellable] [callback]

Ejects a mount. This is an asynchronous operation, and is finished by calling mount:eject-finish? with the self and <GAsyncResult> data returned in the callback.

To override it in a new class, give register-type #:vfuncs `((eject . ,procedure)). The procedure is called as (procedure self flags cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Virtual method: mount:do-eject-finish implementor self result ⇒ %return

Finishes ejecting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

To override it in a new class, give register-type #:vfuncs `((eject-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully ejected. #f otherwise.

Virtual method: mount:do-eject-with-operation implementor self flags [mount-operation] [cancellable] [callback]

Ejects a mount. This is an asynchronous operation, and is finished by calling mount:eject-with-operation-finish? with the self and <GAsyncResult> data returned in the callback.

To override it in a new class, give register-type #:vfuncs `((eject-with-operation . ,procedure)). The procedure is called as (procedure self flags mount-operation cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the unmount if required for eject

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Virtual method: mount:do-eject-with-operation-finish implementor self result ⇒ %return

Finishes ejecting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

To override it in a new class, give register-type #:vfuncs `((eject-with-operation-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully ejected. #f otherwise.

Virtual method: mount:do-get-default-location implementor self ⇒ %return

Gets the default location of self. The default location of the given self is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume).

To override it in a new class, give register-type #:vfuncs `((get-default-location . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GFile>.

a <GFile>. The returned object should be unreffed with object:unref when no longer needed.

Virtual method: mount:do-get-drive implementor self ⇒ %return

Gets the drive for the self.

This is a convenience method for getting the <GVolume> and then using that object to get the <GDrive>.

To override it in a new class, give register-type #:vfuncs `((get-drive . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GDrive>, or #f.

a <GDrive> or #f if self is not associated with a volume or a drive. The returned object should be unreffed with object:unref when no longer needed.

Virtual method: mount:do-get-icon implementor self ⇒ %return

Gets the icon for self.

To override it in a new class, give register-type #:vfuncs `((get-icon . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GIcon>.

a <GIcon>. The returned object should be unreffed with object:unref when no longer needed.

Virtual method: mount:do-get-name implementor self ⇒ %return

Gets the name of self.

To override it in a new class, give register-type #:vfuncs `((get-name . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a string.

the name for the given self. The returned string should be freed with byte-array:free when no longer needed.

Virtual method: mount:do-get-root implementor self ⇒ %return

Gets the root directory on self.

To override it in a new class, give register-type #:vfuncs `((get-root . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GFile>.

a <GFile>. The returned object should be unreffed with object:unref when no longer needed.

Virtual method: mount:do-get-sort-key implementor self ⇒ %return

Gets the sort key for self, if any.

To override it in a new class, give register-type #:vfuncs `((get-sort-key . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

A <GMount>.

%return

Returned: a string, or #f.

Sorting key for self or #f if no such key is available.

Virtual method: mount:do-get-symbolic-icon implementor self ⇒ %return

Gets the symbolic icon for self.

To override it in a new class, give register-type #:vfuncs `((get-symbolic-icon . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GIcon>.

a <GIcon>. The returned object should be unreffed with object:unref when no longer needed.

Virtual method: mount:do-get-uuid implementor self ⇒ %return

Gets the UUID for the self. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns #f if there is no UUID available.

To override it in a new class, give register-type #:vfuncs `((get-uuid . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a string, or #f.

the UUID for self or #f if no UUID can be computed. The returned string should be freed with byte-array:free when no longer needed.

Virtual method: mount:do-get-volume implementor self ⇒ %return

Gets the volume for the self.

To override it in a new class, give register-type #:vfuncs `((get-volume . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

%return

Returned: a <GVolume>, or #f.

a <GVolume> or #f if self is not associated with a volume. The returned object should be unreffed with object:unref when no longer needed.

Virtual method: mount:do-guess-content-type implementor self force-rescan [cancellable] [callback]

Tries to guess the type of content stored on self. 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.

This is an asynchronous operation (see mount:guess-content-type-sync for the synchronous version), and is finished by calling mount:guess-content-type-finish with the self and <GAsyncResult> data returned in the callback.

To override it in a new class, give register-type #:vfuncs `((guess-content-type . ,procedure)). The procedure is called as (procedure self force-rescan cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>

force-rescan

Passed: a boolean.

Whether to force a rescan of the content. Otherwise a cached result will be used if available

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback

Virtual method: mount:do-guess-content-type-finish implementor self result ⇒ %return

Finishes guessing content types of self. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned. In particular, you may get an not-supported if the mount does not support content guessing.

To override it in a new class, give register-type #:vfuncs `((guess-content-type-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a vector, each a string.

a #f-terminated array of content types or #f on error. Caller should free this array with strfreev when done with it.

Virtual method: mount:do-guess-content-type-sync implementor self force-rescan [cancellable] ⇒ %return

Tries to guess the type of content stored on self. 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.

This is a synchronous operation and as such may block doing IO; see mount:guess-content-type for the asynchronous version.

To override it in a new class, give register-type #:vfuncs `((guess-content-type-sync . ,procedure)). The procedure is called as (procedure self force-rescan cancellable) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>

force-rescan

Passed: a boolean.

Whether to force a rescan of the content. Otherwise a cached result will be used if available

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore

%return

Returned: a vector, each a string.

a #f-terminated array of content types or #f on error. Caller should free this array with strfreev when done with it.

Virtual method: mount:do-pre-unmount implementor self

The ::pre-unmount signal that is emitted when the <GMount> will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.

To override it in a new class, give register-type #:vfuncs `((pre-unmount . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

Virtual method: mount:do-remount implementor self flags [mount-operation] [cancellable] [callback]

Remounts a mount. This is an asynchronous operation, and is finished by calling mount:remount-finish? with the self and GAsyncResults data returned in the callback.

Remounting is useful when some setting affecting the operation of the volume has been changed, as these may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting not all backends might need to actually be unmounted.

To override it in a new class, give register-type #:vfuncs `((remount . ,procedure)). The procedure is called as (procedure self flags mount-operation cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountMountFlags>, or a list of its symbols, or one of them.

flags affecting the operation

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Virtual method: mount:do-remount-finish implementor self result ⇒ %return

Finishes remounting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

To override it in a new class, give register-type #:vfuncs `((remount-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully remounted. #f otherwise.

Virtual method: mount:do-unmount implementor self flags [cancellable] [callback]

Unmounts a mount. This is an asynchronous operation, and is finished by calling mount:unmount-finish? with the self and <GAsyncResult> data returned in the callback.

To override it in a new class, give register-type #:vfuncs `((unmount . ,procedure)). The procedure is called as (procedure self flags cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the operation

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Virtual method: mount:do-unmount-finish implementor self result ⇒ %return

Finishes unmounting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

To override it in a new class, give register-type #:vfuncs `((unmount-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully unmounted. #f otherwise.

Virtual method: mount:do-unmount-with-operation implementor self flags [mount-operation] [cancellable] [callback]

Unmounts a mount. This is an asynchronous operation, and is finished by calling mount:unmount-with-operation-finish? with the self and <GAsyncResult> data returned in the callback.

To override it in a new class, give register-type #:vfuncs `((unmount-with-operation . ,procedure)). The procedure is called as (procedure self flags mount-operation cancellable callback user-data).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

flags

Passed: a <GMountUnmountFlags>, or a list of its symbols, or one of them.

flags affecting the operation

mount-operation

Passed, or left out: a <GMountOperation>, or #f.

a <GMountOperation> or #f to avoid user interaction.

cancellable

Passed, or left out: a <GCancellable>, or #f.

optional <GCancellable> object, #f to ignore.

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback, or #f.

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data passed to callback.

Virtual method: mount:do-unmount-with-operation-finish implementor self result ⇒ %return

Finishes unmounting a mount. If any errors occurred during the operation, error will be set to contain the errors and #f will be returned.

To override it in a new class, give register-type #:vfuncs `((unmount-with-operation-finish . ,procedure)). The procedure is called as (procedure self result) ⇒ %return.

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.

a <GMount>.

result

Passed: a <GAsyncResult>.

a <GAsyncResult>.

%return

Returned: a boolean.

#t if the mount was successfully unmounted. #f otherwise.

Virtual method: mount:do-unmounted implementor self

The unmounted signal that 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.

To override it in a new class, give register-type #:vfuncs `((unmounted . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: a class that implements <GMount>, or its GType number.

self

Passed: a <GMount>.