english/libraries/joomla/filesystem/stream.php
/**
	 * Retrieve the file size of the path
	 *
	 * @return  mixed
	 *
	 * @since   11.1
	 */
Retrieve the file size of the path
@return  mixed


Retrieve the file size of the path @return mixed
function filesize()
	{
		if (!$this->filename) {
			$this->setError(JText::_('JLIB_FILESYSTEM_ERROR_STREAMS_FILE_NOT_OPEN'));
			return false;
		}
		$retval = false;
		$php_errormsg = '';
		$track_errors = ini_get('track_errors');
		ini_set('track_errors', true);
		$res = @filesize($this->filename);
		if (!$res) {
			$tmp_error = '';
			if ($php_errormsg) {
				$tmp_error = $php_errormsg;
			}
			$res = JFilesystemHelper::remotefsize($this->filename);
			if (!$res) {
				if ($tmp_error) {
					$this->setError($tmp_error);
				}
				else {
					$this->setError(JText::_('JLIB_FILESYSTEM_ERROR_STREAMS_FILE_SIZE'));
				}
			}
			else {
				$this->_filesize = $res;
				$retval = $res;
			}
		}
		else {
			$this->_filesize = $res;
			$retval = $res;
		}
		ini_set('track_errors', $track_errors);
		return $retval;
	}
function filesize ( ) { if ( ! $ this -> filename ) { $ this -> setError ( JText :: _ ( 'JLIB_FILESYSTEM_ERROR_STREAMS_FILE_NOT_OPEN' ) ) ; return false ; } $ retval = false ; $ php_errormsg = '' ; $ track_errors = ini_get ( 'track_errors' ) ; ini_set ( 'track_errors' , true ) ; $ res = @ filesize ( $ this -> filename ) ; if ( ! $ res ) { $ tmp_error = '' ; if ( $ php_errormsg ) { $ tmp_error = $ php_errormsg ; } $ res = JFilesystemHelper :: remotefsize ( $ this -> filename ) ; if ( ! $ res ) { if ( $ tmp_error ) { $ this -> setError ( $ tmp_error ) ; } else { $ this -> setError ( JText :: _ ( 'JLIB_FILESYSTEM_ERROR_STREAMS_FILE_SIZE' ) ) ; } } else { $ this -> _filesize = $ res ; $ retval = $ res ; } } else { $ this -> _filesize = $ res ; $ retval = $ res ; } ini_set ( 'track_errors' , $ track_errors ) ; return $ retval ; }
Retrieve the file size of the path
 @return  mixed
Retrieve the file size of the path @return mixed
// Capture PHP errors // Something went wrong. // Store the error in case we need it. // Use the php_errormsg from before // Error but nothing from php? How strange! Create our own // Restore error tracking to what it was before. // return the result