category OSS
package OSS_DiskUtils
copyright Copyright (c) 2007 - 2013, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Summarize disk usage of each FILE, recursively for directories.

du(string $path, bool $summarize, string $du) : mixed
Static

It is also configurable (via Zend_Application config and assuming 'options' is available in Zend_Registry as it would be from OSS_Controller_Action).

You can configure the du application path by setting config: disk_utils.binary.du

If folder not exists on given path function return false. If summarize is set to true than it function return folder size in bytes, else it returns array with with folder size in bytes and folder path.

Parameters

$path

string

Path to folder for size checking

$summarize

bool

If it set to true then displays only a total for each argument.

$du

string

Path to du application, if is not set or file on given path is not existent it uses /usr/bin/du as default.

Exceptions

\OSS_Exception Cannot find du path.

Returns

mixed

 Constants

 

DEFAULTS_PATH_DU

DEFAULTS_PATH_DU