private void recreateDirectoryIfVersionChanges(){
  boolean recreateBase=false;
  if (!mRootDirectory.exists()) {
    recreateBase=true;
  }
 else   if (!mVersionDirectory.exists()) {
    recreateBase=true;
    FileTree.deleteRecursively(mRootDirectory);
  }
  if (recreateBase) {
    try {
      FileUtils.mkdirs(mVersionDirectory);
    }
 catch (    FileUtils.CreateDirectoryException e) {
      mCacheErrorLogger.logError(CacheErrorLogger.CacheErrorCategory.WRITE_CREATE_DIR,TAG,"version directory could not be created: " + mVersionDirectory,null);
    }
  }
}

private void recreateDirectoryIfVersionChanges ( ) { boolean recreateBase = false ; if ( ! mRootDirectory . exists ( ) ) { recreateBase = true ; } else if ( ! mVersionDirectory . exists ( ) ) { recreateBase = true ; FileTree . deleteRecursively ( mRootDirectory ) ; } if ( recreateBase ) { try { FileUtils . mkdirs ( mVersionDirectory ) ; } catch ( FileUtils . CreateDirectoryException e ) { mCacheErrorLogger . logError ( CacheErrorLogger . CacheErrorCategory . WRITE_CREATE_DIR , TAG , "version directory could not be created: " + mVersionDirectory , null ) ; } } }
checks if we have to recreate rootdirectory . this is needed because old versions of this storage created too much different files in the same dir , and samsung ' s rfs has a bug that after the 13 . 000th creation fails . so if cache is not already in expected version let ' s destroy everything ( if not in expected version . . . there ' s nothing to reuse here anyway ) .
