class Size (View source)

Constants

COM

Defines the instance to use the COM module to calculate the file size.

Note: It can be combined with the other modes, which will serve as alternatives

CURL

Defines the instance to use the cURL module to calculate the file size.

Note: It can be combined with the other modes, which will serve as alternatives

SYSTEM

Defines the instance to use shell commands to calculate the file size.

Note: It can be combined with the other modes, which will serve as alternatives

Methods

__construct(int $modes = 0)

Define supported modes

float|int|string
get(string $path)

Get file size using defined modes Note: If it is not a file or does not exist, this method will return false.

__destruct()

No description

Details

__construct(int $modes = 0)

Define supported modes

Parameters

int $modes

Exceptions

Exception

float|int|string get(string $path)

Get file size using defined modes Note: If it is not a file or does not exist, this method will return false.

Parameters

string $path

Path to the file

Return Value

float|int|string

Each mode may return a different type of value

Exceptions

Exception

__destruct()

No description