File.findEnclosingMount

gio.mount.Mount findEnclosingMount(gio.cancellable.Cancellable cancellable = null)

Gets a #GMount for the #GFile.

#GMount is returned only for user interesting locations, see #GVolumeMonitor. If the #GFileIface for file does not have a #mount, error will be set to [gio.types.IOErrorEnum.NotFound] 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.types.IOErrorEnum.Cancelled] will be returned.

Parameters

cancellableoptional #GCancellable object, null to ignore

Returns

a #GMount where the file is located

or null on error. Free the returned object with [gobject.object.ObjectWrap.unref].

Throws

[ErrorWrap]