@Test public void testCreateDirIfAbsent () { if (new File("../temp/junit-test1").exists()) { new File("../temp/junit-test1").delete(); } assertEquals(false, new File("../temp/junit-test1").exists()); Cache cache = new Cache("../temp/"); cache.createDirIfAbsent("junit-test1"); assertEquals(true,new File("../temp/junit-test1").exists()); assertEquals(true, new File("../temp/junit-test1").isDirectory()); new File("../temp/junit-test1").delete(); }
public void createDirIfAbsent (String dirName) { FileUtils.createWritableDirIfAbsent(CACHE_PATH + dirName + "/"); }
Cache { public void createDirIfAbsent (String dirName) { FileUtils.createWritableDirIfAbsent(CACHE_PATH + dirName + "/"); } }
Cache { public void createDirIfAbsent (String dirName) { FileUtils.createWritableDirIfAbsent(CACHE_PATH + dirName + "/"); } protected  Cache(String path); }
Cache { public void createDirIfAbsent (String dirName) { FileUtils.createWritableDirIfAbsent(CACHE_PATH + dirName + "/"); } protected  Cache(String path); static void init(String path); static Cache getInstance(); String getPath(); void createDirIfAbsent(String dirName); String getCachePath(String dirName); String getCacheFilePath(String filePath); void clear(); }
Cache { public void createDirIfAbsent (String dirName) { FileUtils.createWritableDirIfAbsent(CACHE_PATH + dirName + "/"); } protected  Cache(String path); static void init(String path); static Cache getInstance(); String getPath(); void createDirIfAbsent(String dirName); String getCachePath(String dirName); String getCacheFilePath(String filePath); void clear();  }