public function getSize() : int
    {
        $size = -1;

        if ($this->isFile()) {
            $size = filesize($this->realPath);
        }

        return $size;
    }
public function getSize() : int
    {
        $size = -1;

        if ($this->isFile()) {
            $size = filesize($this->realPath);
        }

        return $size;
    }
public function getSize ( ) : int { $ size = - 1 ; if ( $ this -> isFile ( ) ) { $ size = filesize ( $ this -> realPath ) ; } return $ size ; }
Gets the size of a file.
If the current source is not a file, returns -1.

@return int
Gets the size of a file . If the current source is not a file returns - 1 .