在线文档教程
PHP
SPL/File

SplFileInfo::getSize

SplFileInfo::getSize

(PHP 5 >= 5.1.2, PHP 7)

SplFileInfo::getSize — Gets file size

Description

public int SplFileInfo::getSize ( void )

Returns the filesize in bytes for the file referenced.

Parameters

This function has no parameters.

Return Values

The filesize in bytes.

Errors/Exceptions

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

See Also

  • filesize() - Gets file size

← SplFileInfo::getRealPath

SplFileInfo::getType →

© 1997–2017 The PHP Documentation Group

Licensed under the Creative Commons Attribution License v3.0 or later.

https://secure.php.net/manual/en/splfileinfo.getsize.php