Class FilePathUtils

java.lang.Object
com.atlassian.crowd.upgrade.util.FilePathUtils

public class FilePathUtils extends Object
  • Constructor Details

    • FilePathUtils

      public FilePathUtils()
  • Method Details

    • getUniqueFilename

      public static Path getUniqueFilename(Path targetDirectory, String fileName)
      Tries to find a filename that doesn't exist in the target directory, by appending a numeric suffix to the given filename
      Parameters:
      targetDirectory - the directory to check
      fileName - the filename wanted
      Returns:
      a filename that doesn't yet exist in the target directory, this is the passed filename if possible, or the file name with a numeric suffix if not