Class FileUtils
java.lang.Object
fr.codinbox.connector.commons.utils.FileUtils
File-related utility methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExtension(@NotNull String filePath) Extracts the file extension from the given file path.
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
getExtension
Extracts the file extension from the given file path.The extension is the substring after the last
'.'character. For example,"config.yml"returns"yml", and"path/to/file.tar.gz"returns"gz".- Parameters:
filePath- the file path to extract the extension from- Returns:
- the file extension (without the dot), or
nullif no extension is present
-