Gio.Mount

const Gio = imports.gi.Gio;

let mount = new Gio.Mount();
  

The Gio.Mount interface represents user-visible mounts. Note, when porting from GnomeVFS, Gio.Mount is the moral equivalent of #GnomeVFSVolume.

Gio.Mount 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. Might or might not be related to a volume object.

Unmounting a Gio.Mount instance is an asynchronous operation. For more information about asynchronous operations, see Gio.AsyncResult and Gio.Task. To unmount a Gio.Mount instance, first call Gio.Mount.prototype.unmount_with_operation with (at least) the Gio.Mount instance and a Gio.AsyncReadyCallback. The callback will be fired when the operation has resolved (either with success or failure), and a #GAsyncReady structure will be passed to the callback. That callback should then call Gio.Mount.prototype.unmount_with_operation_finish with the Gio.Mount and the #GAsyncReady data to see if the operation was completed successfully. If an @error is present when Gio.Mount.prototype.unmount_with_operation_finish is called, then it will be filled with any error information.

Prerequisites

Mount requires GObject.Object

Known Implementations

None