public static function disk(String $dir, String $type = 'free') : Float
    {
        $dir = self::rpath($dir);

        if( ! is_dir($dir) )
        {
            throw new Exception\FolderNotFoundException(NULL, $dir);
        }

        if( $type === 'free' )
        {
            return disk_free_space($dir);
        }
        else
        {
            return disk_total_space($dir);
        }
    }
public static function disk(String $dir, String $type = 'free') : Float
    {
        $dir = self::rpath($dir);

        if( ! is_dir($dir) )
        {
            throw new Exception\FolderNotFoundException(NULL, $dir);
        }

        if( $type === 'free' )
        {
            return disk_free_space($dir);
        }
        else
        {
            return disk_total_space($dir);
        }
    }
public static function disk ( String $ dir , String $ type = 'free' ) : Float { $ dir = self :: rpath ( $ dir ) ; if ( ! is_dir ( $ dir ) ) { throw new Exception \ FolderNotFoundException ( NULL , $ dir ) ; } if ( $ type === 'free' ) { return disk_free_space ( $ dir ) ; } else { return disk_total_space ( $ dir ) ; } }
Get free disk space

@param string $dir
@param string $type = 'free'

@return float
Get free disk space