Recursively deletes a directory.
public static unlinkRecursive ( string $dir, boolean $deleteRootToo, Closure $beforeUnlink = null ) | ||
$dir | string | Path of the directory to delete. |
$deleteRootToo | boolean | If true, `$dir` is deleted, otherwise just its contents. |
$beforeUnlink | Closure | An optional closure to execute on a file path before unlinking. |