WP_Filesystem_Direct::size( string $file ): int|false

In this article

Gets the file size (in bytes).

Parameters

$filestringrequired
Path to file.

Return

int|false Size of the file in bytes on success, false on failure.

Source

public function size( $file ) {
	return @filesize( $file );
}

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.