Package org.rodnansol.core.util
Class CoreFileUtils
- java.lang.Object
-
- org.rodnansol.core.util.CoreFileUtils
-
public final class CoreFileUtils extends Object
Class containing utility methods.- Since:
- 0.1.0
- Author:
- nandorholozsnyak
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FileinitializeFileWithPath(File targetFile)Initialize a file and its parent directories and returns the file.static FileinitializeFileWithPath(String targetFilePath)Initialize a file and its parent directories and returns the file.static booleanisJarOrZipFile(File input)Checks if the input is a JAR or ZIP file based on its extension.
-
-
-
Method Detail
-
initializeFileWithPath
public static File initializeFileWithPath(String targetFilePath) throws DocumentGenerationException
Initialize a file and its parent directories and returns the file.- Parameters:
targetFilePath- target file path.- Returns:
- the created file instance.
- Throws:
DocumentGenerationException- if the target file or its directories can not be created.
-
initializeFileWithPath
public static File initializeFileWithPath(File targetFile) throws DocumentGenerationException
Initialize a file and its parent directories and returns the file.- Parameters:
targetFile- target file.- Returns:
- the created file instance.
- Throws:
DocumentGenerationException- if the target file or its directories can not be created.
-
isJarOrZipFile
public static boolean isJarOrZipFile(File input)
Checks if the input is a JAR or ZIP file based on its extension.- Parameters:
input- input.- Returns:
- true if the input is a JAR or ZIP file, otherwise false.
-
-