This commit is contained in:
Dennis Guse
2020-01-03 22:34:11 +01:00
parent 27e50b2dd9
commit 09fe35f1ca
38 changed files with 120 additions and 208 deletions
@@ -80,19 +80,6 @@ public class FileUtils {
return buildUniqueFileName(directory, fileBaseName, extension, 0);
}
/**
* Gets the name from a file name, without the extension.
*
* @param fileName the file name
*/
public static String getName(String fileName) {
int index = fileName.lastIndexOf('.');
if (index == -1) {
return fileName;
}
return fileName.substring(0, index);
}
/**
* Gets the extension from a file name.
* Returns null if there is no extension.