Gio.File.prototype.find_enclosing_mount

function find_enclosing_mount(cancellable: Gio.Cancellable): Gio.Mount {
    // Gjs wrapper for g_file_find_enclosing_mount()
}
  

Gets a Gio.Mount for the Gio.File.

If the Gio.FileIface for file does not have a mount (e.g. possibly a remote share), @error will be set to Gio.IOErrorEnum.not_found and null will be returned.

If cancellable is not null, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error Gio.IOErrorEnum.cancelled will be returned.

cancellable

optional Gio.Cancellable object, null to ignore

Returns

a Gio.Mount where the file is located or null on error. Free the returned object with GObject.Object.prototype.unref.