Horde_Vfs_Base::listFolder PHP Метод

listFolder() публичный Метод

Returns a file list of the directory passed in.
public listFolder ( string $path, string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false, boolean $recursive = false ) : array
$path string The path of the directory.
$filter string | array Regular expression(s) to filter file/directory name on.
$dotfiles boolean Show dotfiles?
$dironly boolean Show only directories?
$recursive boolean Return all directory levels recursively?
Результат array File list.
    public function listFolder($path, $filter = null, $dotfiles = true, $dironly = false, $recursive = false)
    {
        $list = $this->_listFolder($path, $filter, $dotfiles, $dironly);
        if (!$recursive) {
            return $list;
        }
        if (strlen($path)) {
            $path .= '/';
        }
        foreach ($list as $name => $values) {
            if ($values['type'] == '**dir') {
                $list[$name]['subdirs'] = $this->listFolder($path . $name, $filter, $dotfiles, $dironly, $recursive);
            }
        }
        return $list;
    }