File file = new File(dir, name); if (file.exists()) return new FileResource(this, name, file);
try { File file = new File(dir, name).getCanonicalFile(); if (file.exists() && !file.isDirectory()) return new FileResource(this, file.getPath(), file); } catch (IOException e) {  }
    Resource getResource(String name)    {      File file = new File(dir, name);      if (file.exists())	return new FileResource(this, name, file);      return null;    }