Function __global->get_directory_size
Definitions
sources/files2.php
- Get the size in bytes of a directory. It is assumed that the directory exists.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $path | PATH | No | No | required parameter | N/A | N/A | The path to search |
| $recurse | boolean | No | No | True | N/A | N/A | Whether to recurse |
Returns
- The size in bytes
- Type: integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the size in bytes of a directory. It is assumed that the directory exists.
*
* @param PATH $path The path to search
* @param boolean $recurse Whether to recurse
* @return integer The size in bytes
*/
function get_directory_size(string $path, bool $recurse = true) : int
* Get the size in bytes of a directory. It is assumed that the directory exists.
*
* @param PATH $path The path to search
* @param boolean $recurse Whether to recurse
* @return integer The size in bytes
*/
function get_directory_size(string $path, bool $recurse = true) : int

