make_directory_with_parents
Description:
[ Version ( since = "2.18" ) ]
public bool make_directory_with_parents (Cancellable? cancellable = null) throws Error
public bool make_directory_with_parents (Cancellable? cancellable = null) throws Error
Example: Create a directory with parents:
public static int main (string[] args) {
if (args.length != 2) {
print ("%s NEW-DIRECTORY-NAME\n", args[0]);
return 0;
}
try {
File file = File.new_for_commandline_arg (args[1]);
file.make_directory_with_parents ();
} catch (Error e) {
print ("Error: %s\n", e.message);
}
return 0;
}
valac --pkg gio-2.0 GLib.File.make_directory_with_parents.vala