Automattic\WooCommerce\Internal\Admin\Logging\FileV2
File::get_file_size
Get the size of the file in bytes. Or false if the file isn't readable.
Method of the class: File{}
No Hooks.
Returns
Int|false.
Usage
$File = new File(); $File->get_file_size();
File::get_file_size() File::get file size code WC 10.9.1
public function get_file_size() {
try {
$filesystem = FilesystemUtil::get_wp_filesystem();
if ( ! $filesystem->is_readable( $this->path ) ) {
return false;
}
$size = $filesystem->size( $this->path );
} catch ( Exception $exception ) {
return false;
}
return $size;
}