public function __construct(string $rootPath) { if (!is_dir($rootPath)) { throw DatasetException::missingFolder($rootPath); } $this->scanRootPath($rootPath); }