code: public static boolean copy(File source, File destination) {
          boolean result = true;
          if (source.isDirectory()) {
              if (destination.exists()) {
                  result = result && destination.isDirectory();
              } else {
                  result = result && destination.mkdirs();
              }
              File[] children = source.listFiles();
              for (File element : children) {
                  result =
                          result
                                  && copy(new File(source, element.getName()),
                                          new File(destination, element.getName()));
              }
              return result;
          } else {
              try {
                  InputStream in = new FileInputStream(source);
                  OutputStream out = new FileOutputStream(destination);
                  result = result && copy(in, out);
                  in.close();
                  out.close();
                  return result;
              } catch (IOException e) {
                  return false;
              }
          }
      }
docs: Copy a file or directory.
  
  @param source
  @param destination
  @return <code>true</code> if the operation was successful;
  <code>false</code> otherwise (which includes a null input).