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 ) ; }
Copy files from a source to a target under a _default sub directory .