
com.soulgalore.velocity.FileTool Maven / Gradle / Ivy
package com.soulgalore.velocity;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class FileTool {
private Map simpleCache = new HashMap();
public FileTool() {
}
// unsync
public boolean doFileExist(String path) {
if (simpleCache.containsKey(path))
return simpleCache.get(path);
else {
File file = new File (path);
Boolean exists = file.exists();
simpleCache.put(path, exists);
return exists;
}
}
// Used for debugging
public String fullPath(String path) {
File file = new File (path);
return file.getAbsolutePath();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy