Function __global->get_file_size
Definitions
sources/files.php
- Get a formatted-string filesize for the specified file. It is formatted as such: x MB/KB/Bytes (or unknown). It is assumed that the file exists.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $url | URLPATH | No | No | required parameter | N/A | N/A | The URL that the file size of is being worked out for. Should be local. |
Returns
- The formatted-string file size
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get a formatted-string filesize for the specified file. It is formatted as such: x MB/KB/Bytes (or unknown). It is assumed that the file exists.
*
* @param URLPATH $url The URL that the file size of is being worked out for. Should be local.
* @return string The formatted-string file size
*/
function get_file_size(string $url) : string
* Get a formatted-string filesize for the specified file. It is formatted as such: x MB/KB/Bytes (or unknown). It is assumed that the file exists.
*
* @param URLPATH $url The URL that the file size of is being worked out for. Should be local.
* @return string The formatted-string file size
*/
function get_file_size(string $url) : string

