All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.soulgalore.velocity.FileTool Maven / Gradle / Ivy

There is a newer version: 1.8.8
Show newest version
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