public static function missingFolder($path) { return new self(sprintf('Dataset root folder "%s" missing.', $path)); }
/** * @param string $rootPath * * @throws DatasetException */ public function __construct(string $rootPath) { if (!is_dir($rootPath)) { throw DatasetException::missingFolder($rootPath); } $this->scanRootPath($rootPath); }