service/components/storages/LocalStorage.php
/**
     * Returns directory size in bytes or false if directory not exists
     *
     * @param  string $directory
     * @return integer|boolean
     */
Returns directory size in bytes or false if directory not exists
@param  string $directory
@return integer|boolean
Returns directory size in bytes or false if directory not exists @param string $directory @return integer|boolean
protected function lsDirectory($directory)
    {
        $directory = $this->prepareEntity($directory);
        $list = array();
        if (($dh = @opendir($directory)) !== false) {
            while (($child = readdir($dh)) !== false) {
                if ($child != '.' && $child != '..') {
                    if (@is_dir($directory.'/'.$child)) {
                        $list = array_merge($list, $this->lsDirectory($directory.'/'.$child));
                    } else {
                        $list[] = str_ireplace($this->getRoot().'/', '', $directory.'/'.$child);
                    }
                }
            }
            closedir($dh);
        }
        return $list;
    }
protected function lsDirectory ( $ directory ) { $ directory = $ this -> prepareEntity ( $ directory ) ; $ list = array ( ) ; if ( ( $ dh = @ opendir ( $ directory ) ) !== false ) { while ( ( $ child = readdir ( $ dh ) ) !== false ) { if ( $ child != '.' && $ child != '..' ) { if ( @ is_dir ( $ directory . '/' . $ child ) ) { $ list = array_merge ( $ list , $ this -> lsDirectory ( $ directory . '/' . $ child ) ) ; } else { $ list [ ] = str_ireplace ( $ this -> getRoot ( ) . '/' , '' , $ directory . '/' . $ child ) ; } } } closedir ( $ dh ) ; } return $ list ; }
Returns directory size in bytes or false if directory not exists
 @param  string $directory
 @return integer|boolean
Returns directory size in bytes or false if directory not exists @param string $directory @return integer|boolean