code: private function isExistingOptionalFile(SplFileInfo $file, string $webDir): bool
      {
          $path = $file->getRelativePathname();
  
          return 'robots.txt' === $path && $this->fs->exists($webDir.'/'.$path);
      }
docs: Checks if an optional file exists.