deleteTemporaryDirectory.php
Table of Contents
Functions
- deleteTemporaryDirectory() : bool
- Deletes a directory located in the system temporary folder (recursively).
Functions
deleteTemporaryDirectory()
Deletes a directory located in the system temporary folder (recursively).
deleteTemporaryDirectory(string|array<string|int, string>|null $path[, bool $assertable = true ][, bool $isReadable = true ][, bool $isWritable = true ]) : bool
The given $path
is appended to sys_get_temp_dir()
in the same way as getTemporaryDirectory():
null
→ sys temp dir itself,'logs'
→ "/tmp/logs",['my', 'app']
→ "/tmp/my/app".
Parameters
- $path : string|array<string|int, string>|null
-
Optional sub‑path(s) inside sys_get_temp_dir().
- $assertable : bool = true
-
Whether to validate the composed directory before deletion. Defaults to true.
- $isReadable : bool = true
-
Check readability (passed to assertDirectory()). Defaults to true.
- $isWritable : bool = true
-
Check writability (passed to assertDirectory()). Defaults to true.
Tags
Return values
bool —True if the directory was deleted or did not exist.