Package com.atlassian.crowd.upgrade.util
Class FilePathUtils
java.lang.Object
com.atlassian.crowd.upgrade.util.FilePathUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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
-
Constructor Details
-
FilePathUtils
public FilePathUtils()
-
-
Method Details
-
getUniqueFilename
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 checkfileName
- 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
-