org.ops4j.pax.runner.scanner.dir.internal
Class DirectoryLister

java.lang.Object
  extended by org.ops4j.pax.runner.scanner.dir.internal.DirectoryLister
All Implemented Interfaces:
Lister

public class DirectoryLister
extends java.lang.Object
implements Lister

Implementation of lister that list content of a system file directory.

Since:
September 04, 2007
Author:
Alin Dreghiciu

Constructor Summary
DirectoryLister(java.io.File dir, java.util.regex.Pattern filter)
          Creates a new directory lister.
 
Method Summary
 java.util.List<java.net.URL> list()
          Returns a list of urls the lister knows about.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryLister

public DirectoryLister(java.io.File dir,
                       java.util.regex.Pattern filter)
Creates a new directory lister.

Parameters:
dir - the base directory from where the files should be listed
filter - filter to be used to filter entries from the directory
Method Detail

list

public java.util.List<java.net.URL> list()
                                  throws java.net.MalformedURLException
Returns a list of urls the lister knows about.

Specified by:
list in interface Lister
Returns:
list of urls
Throws:
java.net.MalformedURLException - If an underlying problem occurs in the OSGi framework.


Copyright © 2008. All Rights Reserved.