new-integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/FileUtils.java
public static void copyFolder(String srcDir, String destDir) throws IOException {
    Path srcPath = Paths.get(srcDir);
    Path destPath = Paths.get(destDir);
    try (Stream<Path> stream = Files.walk(srcPath)) {
      stream.forEach(source -> {
        try {
          copy(source, destPath.resolve(srcPath.relativize(source)));
        } catch (IOException e) {
          String msg = String.format("Failed to copy file %s to %s", source, destDir);
          getLogger().severe(msg, e);
          // cannot throw non runtime exception. the caller checks throwable
          throw new RuntimeException(msg);
        }
      });
    }
  }
/**
   * Copy files from source directory to destination directory.
   *
   * @param srcDir source directory
   * @param destDir target directory
   * @throws IOException if the operation encounters an issue
   */
Copy files from source directory to destination directory.
@param srcDir source directory
@param destDir target directory
@throws IOException if the operation encounters an issue
Copy files from source directory to destination directory . @param srcDir source directory @param destDir target directory @throws IOException if the operation encounters an issue
public static void copyFolder(String srcDir, String destDir) throws IOException {
    Path srcPath = Paths.get(srcDir);
    Path destPath = Paths.get(destDir);
    try (Stream<Path> stream = Files.walk(srcPath)) {
      stream.forEach(source -> {
        try {
          copy(source, destPath.resolve(srcPath.relativize(source)));
        } catch (IOException e) {
          String msg = String.format("Failed to copy file %s to %s", source, destDir);
          getLogger().severe(msg, e);
          throw new RuntimeException(msg);
        }
      });
    }
  }
public static void copyFolder ( String srcDir , String destDir ) throws IOException { Path srcPath = Paths . get ( srcDir ) ; Path destPath = Paths . get ( destDir ) ; try ( Stream < Path > stream = Files . walk ( srcPath ) ) { stream . forEach ( source -> { try { copy ( source , destPath . resolve ( srcPath . relativize ( source ) ) ) ; } catch ( IOException e ) { String msg = String . format ( "Failed to copy file %s to %s" , source , destDir ) ; getLogger ( ) . severe ( msg , e ) ; throw new RuntimeException ( msg ) ; } } ) ; } }
Copy files from source directory to destination directory.
Copy files from source directory to destination directory .
// cannot throw non runtime exception. the caller checks throwable