Package org.exoplatform.crowdin.utils
Class FileUtils
java.lang.Object
org.exoplatform.crowdin.utils.FileUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.maven.plugin.logging.LoggetLog()static voidreplaceCharacters(String filePath, String oldValue, String newValue) replace old string with new string and write to filestatic booleanreplaceCharactersInFile(String filePath, String propertiesFilePath, String replaceListConfigkey) Replace special character in file "filePath".static booleanreplaceStringInFile(String filePath, String regex, String replacement) Replace all String "regex" by String "replacement" in file "filePath"static voidsetLog(org.apache.maven.plugin.logging.Log varLog)
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
setLog
public static void setLog(org.apache.maven.plugin.logging.Log varLog) -
getLog
public static org.apache.maven.plugin.logging.Log getLog() -
replaceStringInFile
Replace all String "regex" by String "replacement" in file "filePath"- Parameters:
filePath-regex-replacement-- Returns:
-
replaceCharactersInFile
public static boolean replaceCharactersInFile(String filePath, String propertiesFilePath, String replaceListConfigkey) Replace special character in file "filePath". The couple (regex,replacement) are defined by "replaceListConfigkey" in .properties file "propertiesFilePath"- Parameters:
filePath-propertiesFilePath-replaceListConfigkey-- Returns:
-
replaceCharacters
replace old string with new string and write to file- Parameters:
filePath-oldValue-newValue-
-