find_enclosing_mount


Description:

public abstract Mount find_enclosing_mount (Cancellable? cancellable = null) throws Error

Example: Find enclosing mount, sync:

public static int main (string[] args) {
try {
File file = File.new_for_commandline_arg (args[0]);
Mount mount = file.find_enclosing_mount ();
print ("%s\n", mount.get_name ());
} catch (Error e) {
print ("Error: %s\n", e.message);
}
return 0;
}

valac --pkg gio-2.0 GLib.File.find_enclosing_mount.vala