/** * Return true if path is dir and has at least one childs directory * * @param string $path dir path * @return bool **/ protected function _subdirs($path) { $ret = false; if ($this->fs->hasDir()) { $ret = $this->fs->hasDir($path); } else { foreach ($this->fs->listContents($path) as $meta) { if ($meta && $meta['type'] !== 'file') { $ret = true; break; } } } return $ret; }