cdm/src/main/java/ucar/nc2/util/DiskCache.java
static public void setRootDirectory(String cacheDir) {
    if (!cacheDir.endsWith("/"))
      cacheDir = cacheDir + "/";
    root = StringUtil2.replace(cacheDir, '\\', "/"); // no nasty backslash

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

    makeRootDirectory();
  }
static public void setRootDirectory ( String cacheDir ) { if ( ! cacheDir . endsWith ( "/" ) ) cacheDir = cacheDir + "/" ; root = StringUtil2 . replace ( cacheDir , ' ' , "/" ) ; // no nasty backslash
 makeRootDirectory ( ) ; }
Set the cache root directory. Create it if it doesnt exist.

@param cacheDir the cache directory
Set the cache root directory . Create it if it doesnt exist .