@Override public void run() { Formatter sbuff = new Formatter(); sbuff.format("DiskCache2 scour on directory= %s%n", root); cleanCache(new File(root), sbuff, true); if (cacheLog.isDebugEnabled()) cacheLog.debug(sbuff.toString()); } }
public void run() { StringBuilder sbuff = new StringBuilder(); sbuff.append("DiskCache2 scour on directory= ").append(root).append("\n"); cleanCache( new File(root), sbuff, true); sbuff.append("----------------------\n"); if (cacheLog != null) cacheLog.info(sbuff.toString()); } }
public void run() { StringBuilder sbuff = new StringBuilder(); sbuff.append("DiskCache2 scour on directory= ").append(root).append("\n"); cleanCache( new File(root), sbuff, true); sbuff.append("----------------------\n"); if (cacheLog != null) cacheLog.info(sbuff.toString()); } }
cleanCache(file, sbuff, false); } else { long duration = now - file.lastModified();
cleanCache(file, sbuff, false); } else { long duration = now - file.lastModified();
cleanCache(file, sbuff, false); } else { long duration = now - file.lastModified();
/** debug */ static public void main(String[] args) throws IOException { DiskCache2 dc = new DiskCache2("C:/TEMP/test/", false, 0, 0); dc.setRootDirectory("C:/temp/chill/"); make(dc, "C:/junk.txt"); make(dc, "C:/some/enchanted/evening/joots+3478.txt"); make(dc, "http://www.unidata.ucar.edu/some/enc hanted/eve'ning/nowrite.gibberish"); dc.showCache( System.out); StringBuilder sbuff = new StringBuilder(); dc.cleanCache(new File( dc.getRootDirectory()), sbuff, true); System.out.println(sbuff); }