org.carrot2.util.resource
Class DirLocator

java.lang.Object
  extended by org.carrot2.util.resource.DirLocator
All Implemented Interfaces:
IResourceLocator

public final class DirLocator
extends Object
implements IResourceLocator

Looks up resources in a filesystem folder.


Constructor Summary
DirLocator(String dirPath)
          Initializes the locator using the given path.
 
Method Summary
 IResource[] getAll(String resource, Class<?> clazz)
          Locate All matching resources and return their abstraction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirLocator

public DirLocator(String dirPath)
Initializes the locator using the given path. If the argument is null or a non-existent folder, the locator will return an empty set of resources.

Method Detail

getAll

public IResource[] getAll(String resource,
                          Class<?> clazz)
Description copied from interface: IResourceLocator
Locate All matching resources and return their abstraction.

Specified by:
getAll in interface IResourceLocator


Copyright (c) Dawid Weiss, Stanislaw Osinski