SplFileInfo::getSize

(PHP 5 >= 5.1.2, PHP 7, PHP 8)

SplFileInfo::getSizeGets file size

說(shuō)明

public SplFileInfo::getSize(): int|false

Returns the filesize in bytes for the file referenced.

參數(shù)

此函數(shù)沒(méi)有參數(shù)。

返回值

The filesize in bytes on success, or false on failure.

錯(cuò)誤/異常

A RuntimeException will be thrown if the file does not exist or an error occurs.

參見(jiàn)