@ Deprecated public static boolean safeMove ( File src , File dest ) throws SecurityException { assert ( src . exists ( ) ) ; final boolean createDestIfNotExist = true ; try { if ( src . isFile ( ) ) FileUtils . moveFile ( src , dest ) ; else FileUtils . moveDirectoryToDirectory ( src , dest , createDestIfNotExist ) ; return true ; } catch ( IOException e ) { log . error ( "{safeMove} Error during move operation: " + e . getMessage ( ) , e ) ; return false ; } }
Safely moves a file from one place to another ensuring the filesystem is left in a consistent state