recurse_dirsize()
recurse_dirsize(
mixed $directory,
mixed $exclude = null,
mixed $max_execution_time = null,
mixed $directory_cache = null
) Gets the size of a directory recursively.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $directory string | Full path of a directory. Required |
| mixed | (string | string[]) $exclude Optional. Full path of a subdirectory to exclude from the total, or array of paths. Expected without trailing slash(es). Default null. Required |
| int | $max_execution_time Optional. Maximum time to run before giving up. In seconds. The timeout is global and is measured from the moment WordPress started to load. Defaults to the value of `max_execution_time` PHP setting. Required |
| array | $directory_cache Optional. Array of cached directory paths. Defaults to the value of `dirsize_cache` transient. Required |