public void setRootDirectory(String cacheDir) {
    if (!cacheDir.endsWith("/"))
      cacheDir = cacheDir + "/";
    root = StringUtil2.replace(cacheDir, '\\', "/"); // no nasty backslash

    File dir = new File(root);
    if (!dir.mkdirs()) {
      // ok
    }
    if (!dir.exists()) {
      fail = true;
      cacheLog.error("DiskCache2 failed to create directory "+root);
    } else {
      cacheLog.debug("DiskCache2 create directory "+root);
    }
  }
public void setRootDirectory(String cacheDir) {
    if (!cacheDir.endsWith("/"))
      cacheDir = cacheDir + "/";
    root = StringUtil2.replace(cacheDir, '\\', "/"); 

    File dir = new File(root);
    if (!dir.mkdirs()) {
      
    }
    if (!dir.exists()) {
      fail = true;
      cacheLog.error("DiskCache2 failed to create directory "+root);
    } else {
      cacheLog.debug("DiskCache2 create directory "+root);
    }
  }
public void setRootDirectory ( String cacheDir ) { if ( ! cacheDir . endsWith ( "/" ) ) cacheDir = cacheDir + "/" ; root = StringUtil2 . replace ( cacheDir , ' ' , "/" ) ; // no nasty backslash File dir = new File ( root ) ; if ( ! dir . mkdirs ( ) ) { // ok } if ( ! dir . exists ( ) ) { fail = true ; cacheLog . error ( "DiskCache2 failed to create directory " + root ) ; } else { cacheLog . debug ( "DiskCache2 create directory " + root ) ; } }
/*
Set the cache root directory. Create it if it doesnt exist.
Normally this is set in the Constructor.
@param cacheDir the cache directory
/ * Set the cache root directory . Create it if it doesnt exist . Normally this is set in the Constructor .