/** * {@inheritDoc} */ public function getRootFileInfo() { $root = new FileInfo($this->driverOptions['rootName'], $this->getDriverId(), time()); $root->setVolumeid($this->getDriverId() . '_'); $root->setDirs(1); return $root; }
/** * set dit $file if it has folders * * @param FileInfo $file * @param string $fulName */ private function setDirs(FileInfo $file, $fulName) { if ($file->isDir()) { if (count(glob($fulName . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR))) { $file->setDirs(1); } } }