deleteRecursive


Description:

public static bool deleteRecursive (Path path)

Recursively deletes a directory and all its contents.

If the path points to a regular file, it is deleted like remove(). If the path does not exist, returns false. Symbolic links are removed without following them.

Example:

    var dir = new Path ("/tmp/mydir");
bool ok = Files.deleteRecursive (dir);

Parameters:

path

path to file or directory to delete recursively.

Returns:

true if deletion succeeded, false otherwise.