org.ops4j.io
Class DirectoryLister

java.lang.Object
  extended by org.ops4j.io.DirectoryLister
All Implemented Interfaces:
Lister

public class DirectoryLister
extends Object
implements Lister

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

Since:
September 04, 2007
Author:
Alin Dreghiciu

Constructor Summary
DirectoryLister(File dir, Pattern filter)
          Creates a new directory lister.
DirectoryLister(File dir, Pattern[] includes, Pattern[] excludes)
          Creates a new directory lister.
 
Method Summary
 List<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(File dir,
                       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

DirectoryLister

public DirectoryLister(File dir,
                       Pattern[] includes,
                       Pattern[] excludes)
Creates a new directory lister.

Parameters:
dir - the base directory from where the files should be listed
includes - filters to be used to include entries from the directory
excludes - filters to be used to exclude entries from the directory
Method Detail

list

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

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


Copyright © 2006-2013 OPS4J - Open Participation Software for Java. All Rights Reserved.