private function checkFileExtension(\SplFileInfo $fileInfo): bool {
    $extension = mb_strtolower($fileInfo->getExtension());
    return mb_strlen($extension) ? in_array(".$extension", $this->getExtensions()->getArrayCopy()) : false;
  }