use of org.jboss.vfs.VirtualFileVisitor in project felix by apache.
the class VFSRevision method loadEntries.
private synchronized void loadEntries() throws URISyntaxException, IOException {
if (m_entries.size() == 0) {
final VirtualFile root = VFS.getChild(m_url.toURI());
final String uriPath = m_url.toURI().getPath();
root.visit(new VirtualFileVisitor() {
public void visit(VirtualFile vfile) {
String entryPath = vfile.getPathName().substring(uriPath.length());
m_entries.put(entryPath, vfile);
}
public VisitorAttributes getAttributes() {
return VisitorAttributes.RECURSE_LEAVES_ONLY;
}
});
}
}
Aggregations