hasDirectories.php
Table of Contents
Functions
- hasDirectories() : bool
- Checks if a directory contains at least one subdirectory, or only subdirectories if strict mode is enabled.
Functions
hasDirectories()
Checks if a directory contains at least one subdirectory, or only subdirectories if strict mode is enabled.
hasDirectories(string|null $dir[, bool $strict = false ]) : bool
Parameters
- $dir : string|null
-
The path to the directory to check. Must be a valid readable directory.
- $strict : bool = false
-
If true, the function returns true only if the directory contains only subdirectories (no files or other items). Defaults to false.
Tags
Return values
bool —Returns true if the directory contains at least one subdirectory, or if in strict mode, only subdirectories.