Torrent::filesize PHP Method

filesize() public static method

Helper to return filesize (even bigger than 2Gb -linux only- and distant files size)
public static filesize ( $file ) : double | boolean
return double | boolean filesize or false if error
    public static function filesize($file)
    {
        if (is_file($file)) {
            return (double) sprintf('%u', @filesize($file));
        } else {
            if ($content_length = preg_grep($pattern = '#^Content-Length:\\s+(\\d+)$#i', (array) @get_headers($file))) {
                return (int) preg_replace($pattern, '$1', reset($content_length));
            }
        }
    }