public static void mv ( File src , File dst ) throws IOException { Parameters . checkNotNull ( dst ) ; if ( ! src . equals ( dst ) ) { cp ( src , dst ) ; try { rm ( src ) ; } catch ( IOException e ) { rm ( dst ) ; throw new IOException ( "Can't move " + src , e ) ; } } }
Moves a file from one path to another . Named after the Unix command of the same name .