hasFiles.php
Table of Contents
Functions
- hasFiles() : bool
- Checks if a directory contains at least one file, or only files if strict mode is enabled.
Functions
hasFiles()
Checks if a directory contains at least one file, or only files if strict mode is enabled.
hasFiles(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 files (no directories or other items). Defaults to false.
Tags
Return values
bool —Returns true if the directory contains at least one file, or if in strict mode, only files.