Class FileUtils

java.lang.Object
org.exoplatform.crowdin.utils.FileUtils

public class FileUtils extends Object
  • 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

      public static boolean replaceStringInFile(String filePath, String regex, String replacement)
      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

      public static void replaceCharacters(String filePath, String oldValue, String newValue)
      replace old string with new string and write to file
      Parameters:
      filePath -
      oldValue -
      newValue -