Package org.wso2.config.mapper.util
Class FileUtils
java.lang.Object
org.wso2.config.mapper.util.FileUtils
Contains the util methods related to file.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteDirectory(File file) static StringRead a given file and returns the content of the file as a string.static voidwriteDirectory(String configurations, String backupPath, Set<String> fileSet)
-
Method Details
-
readFile
Read a given file and returns the content of the file as a string.- Parameters:
file- File to be read- Returns:
- The content of the file
- Throws:
ConfigParserException- If file doesn't exist or is not a file or if some IO error occurs.
-
deleteDirectory
- Throws:
ConfigParserException
-
writeDirectory
public static void writeDirectory(String configurations, String backupPath, Set<String> fileSet) throws ConfigParserException - Throws:
ConfigParserException
-