Code example for File

Methods: lastModified

0
	 * We usually load our resources from the JAR, or possibly from a file in some setups, so we check the modification time of 
	 * the JAR for resources in a jar and the mtime for files. 
	 */ 
	private Date getUrlMTime(URL url) {
		if (url.getProtocol().equals("jar")) {
			File f = new File(url.getPath().substring(0, url.getPath().indexOf('!')));
			return new Date(f.lastModified());
		} else if (url.getProtocol().equals("file")) {
			File f = new File(url.getPath());
			return new Date(f.lastModified());
		} else { 
			return null; 
		} 
	} 
	 
	private String l10n(String key) {
		return NodeL10n.getBase().getString("StaticToadlet."+key);
	} 
 
	@Override 
	public String path() {