Package eu.svjatoslav.commons.file
Class FilePathParser
java.lang.Object
eu.svjatoslav.commons.file.FilePathParser
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getFileExtension
(File file) Returns file extension.static String
getFileExtension
(String fullFileName) Returns file extension.static String
Returns file name without extension.static String
getFileNameWithoutExtension
(String fullFileName) Returns file name without extension.static String
getFileSizeDescription
(long fileSize) Returns file size description.
-
Constructor Details
-
FilePathParser
public FilePathParser()
-
-
Method Details
-
getFileExtension
Returns file extension.- Parameters:
file
- File.- Returns:
- File extension. Empty string if a file has no extension.
-
getFileExtension
Returns file extension.- Parameters:
fullFileName
- Full file name.- Returns:
- File extension. Empty string if a file has no extension.
-
getFileNameWithoutExtension
Returns file name without extension.- Parameters:
file
- File.- Returns:
- File name without extension.
-
getFileNameWithoutExtension
Returns file name without extension.- Parameters:
fullFileName
- Full file name.- Returns:
- File name without extension.
-
getFileSizeDescription
Returns file size description.- Parameters:
fileSize
- File size in bytes.- Returns:
- File size description.
-