Ah - OK - Cool - Just thought I'd check. Cheers, - Ole
--- Carlos Sanchez <[EMAIL PROTECTED]> wrote: > that topic was already brought before and didn't > succeed > > On 1/31/07, Ole Ersoy <[EMAIL PROTECTED]> wrote: > > I noticed that there seems to be a lot of > > overlap between Archiva's approach to > > file discovery and VFS's. > > > > Should Archiva use VFS? > > > > Overview: > > http://wiki.apache.org/jakarta-commons/VFS > > > > Using the API: > > http://jakarta.apache.org/commons/vfs/api.html > > > > Here's an example of how to get > "maven-metadata.xml" > > files: > > > > public FileObject[] discoverMetadata() > throws > > FileSystemException > > { > > //MetadataDiscoverer > metadataDiscoverer = new > > DefaultMetadataDiscoverer(); > > > > FileSelector ff = new > FileSelector() > > { > > public boolean > includeFile(FileSelectInfo > > fileInfo) throws Exception > > { > > FileObject fileObject = > fileInfo.getFile(); > > return > > > fileObject.getName().getBaseName().contentEquals("maven-metadata.xml"); > > } > > > > public boolean > > traverseDescendents(FileSelectInfo fileInfo) > throws > > Exception > > { > > return true; > > } > > }; > > > > File file = new > File("src/test/resources/"); > > return > > > VFS.getManager().resolveFile(file.getAbsolutePath()).findFiles(ff); > > } > > > > > > > > > > Cheers, > > - Ole > > > > > > > > > > > > > ____________________________________________________________________________________ > > The fish are biting. > > Get more visitors on your site using Yahoo! Search > Marketing. > > > http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > I could give you my word as a Spaniard. > No good. I've known too many Spaniards. > -- The Princess Bride > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ____________________________________________________________________________________ Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
