public static function getUniqueFileName(string $fileName, string $directory): string {
    $basicFileUtility = GeneralUtility::makeInstance(BasicFileUtility::class);

    return $basicFileUtility->getUniqueName($fileName, $directory);
  }
public static function getUniqueFileName(string $fileName, string $directory): string {
    $basicFileUtility = GeneralUtility::makeInstance(BasicFileUtility::class);

    return $basicFileUtility->getUniqueName($fileName, $directory);
  }
public static function getUniqueFileName ( string $ fileName , string $ directory ) : string { $ basicFileUtility = GeneralUtility :: makeInstance ( BasicFileUtility :: class ) ; return $ basicFileUtility -> getUniqueName ( $ fileName , $ directory ) ; }
Gets an unique file name.

@param string $fileName The file name
@param string $directory The directory for which to return a unique file name for, MUST be a valid directory and should be absolute
@return string The unique file name
Gets an unique file name .