code: public static void copyDirs(Path source, Path target, CopyOption... options) throws IOException {
          if (Files.notExists(target)) {
              Files.createDirectory(target);
          }
  
          logger.debug("  --> Copying resources from [{}]", source);
          if (Files.notExists(source)) {
              throw new RuntimeException(source + " doesn't seem to exist.");
          }
  
          Files.walkFileTree(source, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE,
                  new InternalFileVisitor(source, target, options));
  
          logger.debug("  --> Resources ready in [{}]", target);
      }
docs: Copy files from a source to a target
  under a _default sub directory.
  @param source The source dir
  @param target The target dir
  @param options Potential options
  @throws IOException If copying does not work