| Server IP : 167.235.67.158 / Your IP : 216.73.216.95 Web Server : Apache System : Linux ubuntu-8gb-nbg1-1 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : upstairsbar.co.uk ( 982) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/pawsandpatience.co.uk/wp-content/plugins/wp-smushit/core/ |
Upload File : |
<?php
namespace Smush\Core;
class File_Utils {
private $file_sizes_cache = array();
/**
* @var Settings|null
*/
private $settings;
public function __construct() {
$this->settings = Settings::get_instance();
}
public function is_large_file( $file_path ) {
$file_size = $this->get_file_size( $file_path );
$cut_off = $this->settings->get_large_file_cutoff();
return $file_size > $cut_off;
}
public function get_file_size( $file_path ) {
if ( ! isset( $this->file_sizes_cache[ $file_path ] ) ) {
$this->file_sizes_cache[ $file_path ] = file_exists( $file_path ) ? filesize( $file_path ) : 0;
}
return $this->file_sizes_cache[ $file_path ];
}
}