public static boolean move(final File source, final File target) {
        if (!source.exists()) {
            return false;
        }
        FileUtils.mkdirs(target.getParentFile());
        boolean success = source.renameTo(target);
        if (!success) {
            // renameTo might fail across mount points, try copy/delete instead
            success = FileUtils.copy(source, target);
            if (success) {
                FileUtils.deleteDirectory(source);
            } else {
                Log.w("Couldn't move " + source + " to " + target);
            }
        }
        return success;
    }
Moves a file/directory to a new name. Tries a rename first (faster) and falls back
to a copy + delete. Target directories are created if needed.

@param source source file or directory
@param target target file or directory
@return true, if successfully
main/src/main/java/cgeo/geocaching/utils/FileUtils.java