protected function getDirInfo($directory)
    {
        if (! is_dir($directory)) {
            return sprintf($this->_('%s - does not exist'), $directory);
        }

        $free = disk_free_space($directory);
        $total = disk_total_space($directory);

        if ((false === $free) || (false === $total)) {
            return sprintf($this->_('%s - no disk information available'), $directory);
        }

        $percent = intval($free / $total * 100);

        return sprintf(
                $this->_('%s - %s free of %s = %d%% available'),
                $directory,
                \MUtil_File::getByteSized($free),
                \MUtil_File::getByteSized($total),
                $percent
                );
    }
protected function getDirInfo($directory)
    {
        if (! is_dir($directory)) {
            return sprintf($this->_('%s - does not exist'), $directory);
        }

        $free = disk_free_space($directory);
        $total = disk_total_space($directory);

        if ((false === $free) || (false === $total)) {
            return sprintf($this->_('%s - no disk information available'), $directory);
        }

        $percent = intval($free / $total * 100);

        return sprintf(
                $this->_('%s - %s free of %s = %d%% available'),
                $directory,
                \MUtil_File::getByteSized($free),
                \MUtil_File::getByteSized($total),
                $percent
                );
    }
protected function getDirInfo ( $ directory ) { if ( ! is_dir ( $ directory ) ) { return sprintf ( $ this -> _ ( '%s - does not exist' ) , $ directory ) ; } $ free = disk_free_space ( $ directory ) ; $ total = disk_total_space ( $ directory ) ; if ( ( false === $ free ) || ( false === $ total ) ) { return sprintf ( $ this -> _ ( '%s - no disk information available' ) , $ directory ) ; } $ percent = intval ( $ free / $ total * 100 ) ; return sprintf ( $ this -> _ ( '%s - %s free of %s = %d%% available' ) , $ directory , \ MUtil_File :: getByteSized ( $ free ) , \ MUtil_File :: getByteSized ( $ total ) , $ percent ) ; }
Tell all about it

@param string $directory
@return string
Tell all about it