Path.remove

void remove(bool recursive = false) const

Removes the file or directory at this path.

Parameters

recursiveIf true, remove directories and their contents recursively.

Throws

NotFoundError when the path does not exist; PathError

(or a subclass) when removal fails.