deleteDirectory.php
Table of Contents
Functions
- deleteDirectory() : bool
- Deletes a directory recursively.
Functions
deleteDirectory()
Deletes a directory recursively.
deleteDirectory(string|array<string|int, mixed>|null $path[, bool $assertable = true ][, bool $isReadable = true ][, bool $isWritable = true ]) : bool
Symbolic links are removed, never followed. A link met in the tree is unlinked, whether it
points to a directory or to a file, and whether its target still exists or not. The target is
left untouched: nothing is ever deleted through a link. The same holds for $path itself — if
$path is a link to a directory, the link alone is removed and the directory it points to is
kept, so the call does not recurse at all.
Parameters
- $path : string|array<string|int, mixed>|null
-
Directory or segments to remove.
- $assertable : bool = true
-
Whether to validate the resulting path. Defaults to true.
- $isReadable : bool = true
-
Check if the directory is readable (Default true).
- $isWritable : bool = true
-
Check if the directory is writable (Default false).
Tags
Return values
bool —Returns true if the directory is removed.