public static void copy(Path from,Path to,Predicate<Path> shouldCopyFile) throws IOException {
  Files.walkFileTree(from,new FileCopier(from,to,shouldCopyFile,false));
}

public static void copy ( Path from , Path to , Predicate < Path > shouldCopyFile ) throws IOException { Files . walkFileTree ( from , new FileCopier ( from , to , shouldCopyFile , false ) ) ; }
copies a single file or a recursively a whole folder with its content to the given destination . files ( not directories ! ) are copied only if they pass predicate check .
