static function recursiveFrom ($path, $flags = 4096, $mode = self::DIRECTORIES_FIRST)
  {
    try {
      return (new static (new FilesystemIterator($path, $flags)))->recursive (function ($v, $k, $d) use ($flags) {
        $p = is_string ($v) ? $v : ($v instanceof SplFileInfo ? $v->getPathname () : $k);
        $r = is_dir ($p) ? new FilesystemIterator ($p, $flags) : null;
        return $r;
      }, $mode);
    }
    catch (\Exception $e) {
      // Convert UnexpectedValueException to another type to prevent problems with some error handlers.
      throw new \InvalidArgumentException($e->getMessage ());
    }
  }