Package org.javacord.core.util.io
Class FileUtils
- java.lang.Object
-
- org.javacord.core.util.io.FileUtils
-
public class FileUtils extends java.lang.Object
Some utilities for files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getExtension(java.io.File file)
Gets the extension of the given file or"png"
if the file has no extension.static java.lang.String
getExtension(java.lang.String fileName)
Gets the extension of the given file name or"png"
if the file name has no extension.
-
-
-
Method Detail
-
getExtension
public static java.lang.String getExtension(java.io.File file)
Gets the extension of the given file or"png"
if the file has no extension.- Parameters:
file
- The file.- Returns:
- The extension of the given file.
-
getExtension
public static java.lang.String getExtension(java.lang.String fileName)
Gets the extension of the given file name or"png"
if the file name has no extension.- Parameters:
fileName
- The file name.- Returns:
- The extension of the given file.
-
-