File.makeDirectoryWithParents

bool makeDirectoryWithParents(gio.cancellable.Cancellable cancellable = null)

Creates a directory and any parent directories that may not exist similar to 'mkdir -p'. If the file system does not support creating directories, this function will fail, setting error to [gio.types.IOErrorEnum.NotSupported]. If the directory itself already exists, this function will fail setting error to [gio.types.IOErrorEnum.Exists], unlike the similar [glib.global.mkdirWithParents].

For a local #GFile the newly created directories will have the default (current) ownership and permissions of the current process.

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

true if all directories have been successfully created, false

otherwise.

Throws

[ErrorWrap]