Top Description Methods
org.jboss.modules

public Interface IterableResourceLoader

extends ResourceLoader
Known Direct Implementers
org.jboss.modules.JarFileResourceLoader, org.jboss.modules.FilteredIterableResourceLoader, org.jboss.modules.PathResourceLoader
Imports
java.util.Iterator

A resource loader which has the ability to enumerate its contents.
Author
David M. Lloyd

Method Summary

Modifier and TypeMethod and Description
public Iterator<Resource>

Returns:

the resource iterator (possibly empty)
iterateResources
(String
the path to search under
startPath
,
boolean
true to recursively descend into subdirectories, false to only read this path
recursive
)

Enumerate all the resources under the given path.

Inherited from org.jboss.modules.ResourceLoader:
closecreateSubloadergetClassSpecgetLibrarygetLocationgetPackageSpecgetPathsgetResourcegetRootName

Method Detail

iterateResourcesback to summary
public Iterator<Resource> iterateResources(String startPath, boolean recursive)

Enumerate all the resources under the given path. The given path name is relative to the root of the resource loader. If the path "escapes" the root via .., such segments will be consumed. If the path is absolute, it will be converted to a relative path by dropping the leading /.

Parameters
startPath:String

the path to search under

recursive:boolean

true to recursively descend into subdirectories, false to only read this path

Returns:Iterator<Resource>

the resource iterator (possibly empty)