Class FileUtil

java.lang.Object
org.apache.activemq.artemis.utils.FileUtil

public class FileUtil extends Object
  • Constructor Details

    • FileUtil

      public FileUtil()
  • Method Details

    • makeExec

      public static void makeExec(File file) throws IOException
      Throws:
      IOException
    • deleteDirectory

      public static final boolean deleteDirectory(File directory)
    • copyDirectory

      public static final void copyDirectory(File directorySource, File directoryTarget) throws Exception
      Throws:
      Exception
    • findReplace

      public static boolean findReplace(File file, String find, String replace) throws Exception
      Search and replace strings on a file
      Parameters:
      file - file to be replaced
      find - string expected to match
      replace - string to be replaced
      Returns:
      true if the replacement was successful
      Throws:
      Exception
    • readFile

      public static String readFile(InputStream inputStream) throws Exception
      Throws:
      Exception
    • find

      public static boolean find(File file, Predicate<String> search) throws Exception
      Throws:
      Exception