
com.soulgalore.velocity.FileTool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xml-velocity Show documentation
Show all versions of xml-velocity Show documentation
Merge a XML file with a Velocity template
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