/** * Look up a filename in the cache. * @param name the name to look up (case insensitive). * @return the filename on disc (case sensitive). * @throws IOException */ public Location lookup(Location name) throws IOException { Location parent = name.getParentFile(); if (parent != null) { HashMap<String, String> s = fill(parent); if (s != null) { String realname = name.getName(); String lower = realname.toLowerCase(); String f = s.get(lower); if (f != null) { return new Location(parent, f); } } } return name; } }
/** * Look up a filename in the cache. * @param name the name to look up (case insensitive). * @return the filename on disc (case sensitive). * @throws IOException */ public Location lookup(Location name) throws IOException { Location parent = name.getParentFile(); if (parent != null) { HashMap<String, String> s = fill(parent); if (s != null) { String realname = name.getName(); String lower = realname.toLowerCase(); String f = s.get(lower); if (f != null) { return new Location(parent, f); } } } return name; } }