public Node copyFile ( Node dest ) throws FileNotFoundException , CopyException { try ( OutputStream out = dest . newOutputStream ( ) ) { copyFileTo ( out ) ; } catch ( FileNotFoundException e ) { throw e ; } catch ( IOException e ) { throw new CopyException ( this , dest , e ) ; } return this ; }
Overwrites dest if it already exists .