Package ai.djl.repository
Class FilenameUtils
- java.lang.Object
-
- ai.djl.repository.FilenameUtils
-
public final class FilenameUtils extends java.lang.ObjectA class containing utility methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetFileExtension(java.lang.String fileName)Returns the file name extension of the file.static java.lang.StringgetFileType(java.lang.String fileName)Returns the type of the file.static java.lang.StringgetNamePart(java.lang.String name)Returns the name of the file without file extension.static booleanisArchiveFile(java.lang.String fileName)Returns if the the file is an archive file.
-
-
-
Method Detail
-
getFileType
public static java.lang.String getFileType(java.lang.String fileName)
Returns the type of the file.- Parameters:
fileName- the file name- Returns:
- the type of the file
-
isArchiveFile
public static boolean isArchiveFile(java.lang.String fileName)
Returns if the the file is an archive file.- Parameters:
fileName- the file name- Returns:
- the type of the file
-
getNamePart
public static java.lang.String getNamePart(java.lang.String name)
Returns the name of the file without file extension.- Parameters:
name- the file name- Returns:
- the name of the file without file extension
-
getFileExtension
public static java.lang.String getFileExtension(java.lang.String fileName)
Returns the file name extension of the file.- Parameters:
fileName- the file name- Returns:
- the file name extension
-
-