Function Commandr_fs->get_file_size
Definitions
sources/commandr_fs.php
- Calculate the size of a file.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $to_read | array | No | No | required parameter | N/A | N/A | The file to read |
| $force_calculate | boolean | No | No | False | N/A | N/A | Whether to forcefully calculate a size where we would otherwise return -1 for dynamic |
Returns
- The file size (false: failure)
- Type: ~integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Calculate the size of a file.
*
* @param array $to_read The file to read
* @param boolean $force_calculate Whether to forcefully calculate a size where we would otherwise return -1 for dynamic
* @return ~integer The file size (false: failure)
*/
public function get_file_size(array $to_read, bool $force_calculate = false)
* Calculate the size of a file.
*
* @param array $to_read The file to read
* @param boolean $force_calculate Whether to forcefully calculate a size where we would otherwise return -1 for dynamic
* @return ~integer The file size (false: failure)
*/
public function get_file_size(array $to_read, bool $force_calculate = false)

