protected boolean moveDirectory ( Path src , Path target ) throws IOException { if ( Files . exists ( src ) ) { createDirectoryIfNotExists ( target . getParent ( ) ) ; deleteDirectory ( target , false ) ; Files . move ( src , target ) ; cleanEmptyParentDirectory ( src . getParent ( ) ) ; return true ; } else { return false ; } }
Moves a directory in the target location .