private static boolean makeSureExists(File dir) {
        // Make sure the dest directories exist.
        if (!dir.exists()) {
            if (!dir.mkdirs()) {
                Log.error("Could not create the directory "+dir.getPath());
                return false;
            }
        }
        return true;
    }
private static boolean makeSureExists ( File dir ) { if ( ! dir . exists ( ) ) { if ( ! dir . mkdirs ( ) ) { Log . error ( "Could not create the directory " + dir . getPath ( ) ) ; return false ; } } return true ; }
Make sure directory exist, create it if not.