File (File src) { File file = FileUtilRt.getParentFile(src); while (file != null) { for (Map.Entry<File, Set<File>> entry : myOutputsMap.entrySet()) { if (entry.getValue().contains(file)) { return entry.getKey(); } } file = FileUtilRt.getParentFile(file); } return null; }