Subversion Repositories ALCASAR

Rev

Rev 2788 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2788 Rev 2976
Line 75... Line 75...
75
    private $_options = null;
75
    private $_options = null;
76
 
76
 
77
    /**
77
    /**
78
     * inodes usage in percent if available
78
     * inodes usage in percent if available
79
     *
79
     *
80
     * @var
80
     * @var Integer
81
     */
81
     */
82
    private $_percentInodesUsed = null;
82
    private $_percentInodesUsed = null;
83
 
83
 
84
    /**
84
    /**
85
     * ignore mode
85
     * ignore mode
86
     *
86
     *
87
     * @var Ignore
87
     * @var Integer
88
     */
88
     */
89
    private $_ignore = 0;
89
    private $_ignore = 0;
90
 
90
 
91
    /**
91
    /**
92
     * Returns PercentUsed calculated when function is called from internal values
92
     * Returns PercentUsed calculated when function is called from internal values
Line 97... Line 97...
97
     * @return Integer
97
     * @return Integer
98
     */
98
     */
99
    public function getPercentUsed()
99
    public function getPercentUsed()
100
    {
100
    {
101
        if ($this->_total > 0) {
101
        if ($this->_total > 0) {
102
            return round($this->_used / $this->_total * 100);
102
            return 100 - min(floor($this->_free / $this->_total * 100), 100);
103
        } else {
103
        } else {
104
            return 0;
104
            return 0;
105
        }
105
        }
106
    }
106
    }
107
 
107