/** * Search the metadata locations. * In this impl the first one matching is returned. * * @param name the file name to find * @return found file or null if not found */ protected VirtualFile searchMetaDataLocations(String name) { return searchMetaDataLocations(name, MetaDataTypeFilter.DEFAULT); }
public VirtualFile getMetaDataFile(String name) { if (name == null) throw new IllegalArgumentException("Null name"); try { // There isn't a metadata locations so let's see whether the root matches. if (metaDataLocations == null || metaDataLocations.isEmpty()) { // It has to be a plain file if (root != null && SecurityActions.isLeaf(root)) { String fileName = root.getName(); if (fileName.equals(name)) return root; } // No match return null; } // Look in the meta data locations return searchMetaDataLocations(name); } catch (Exception e) { if (log.isTraceEnabled()) log.trace("Error retrieving meta data: " + name + " reason=" + e); return null; } }
return searchMetaDataLocations(name, filter);