public class FileHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
closeLogging() |
static boolean |
createDirectory(String dir)
Create a directory, but no guarantee, it may fail if it is not allowed to create
|
static void |
exportOutputToFile(String outputDirectory,
String fileName,
String content)
Flush the output into a file
|
static boolean |
fileExists(String fileName)
Utility to check whether the given file exist or not
|
static void |
initializeLog(String loggingLevel,
String buildDirectory,
int currentBuildNumber) |
static void |
unzip(String zipFilePath,
String destDir)
This utility is used to unzip any file and extract it to a given directory
|
public static boolean fileExists(String fileName)
fileName
- Full name of the file along with absolute pathpublic static boolean createDirectory(String dir)
dir
- The directory name which you want to createpublic static void initializeLog(String loggingLevel, String buildDirectory, int currentBuildNumber)
public static void closeLogging()
public static void exportOutputToFile(String outputDirectory, String fileName, String content)
outputDirectory
- Folder name where you want to flush the output tofileName
- File Namecontent
- Content of the fileCopyright © 2016–2019. All rights reserved.