-
-
Save sonOfRa/c246b5ef84776691d6bb088fb59aa73d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void createFile(String path) { | |
int suffix = 0; | |
String realPath = path; | |
while (realPath.exists()) { | |
realPath = path + "-" + suffix; | |
suffix++; | |
} | |
createFile(path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment