public function hasChildren($path) { $filesystemPath = $this->getFilesystemPath($path); if (!is_dir($filesystemPath)) { return false; } $iterator = $this->getDirectoryIterator($filesystemPath); $iterator->rewind(); return $iterator->valid(); }