org.objectweb.jonas_lib.loader.locator
Class DirLocator
java.lang.Object
org.objectweb.jonas_lib.loader.locator.Locator
org.objectweb.jonas_lib.loader.locator.DirLocator
- public class DirLocator
- extends Locator
A DirLocator
is used to look up for a file
inside a directory.
- Author:
- Guillaume Sauthier
Method Summary |
boolean |
hasDirectory(java.lang.String path)
Returns true when directory was found. |
boolean |
hasFile(java.lang.String path)
Returns true when file was found. |
java.util.List |
listContent(java.lang.String path)
Returns a list of filename stored in path. |
Methods inherited from class org.objectweb.jonas_lib.loader.locator.Locator |
getLocator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirLocator
public DirLocator(java.net.URL jar)
throws java.io.IOException
hasFile
public boolean hasFile(java.lang.String path)
- Returns true when file was found.
- Specified by:
hasFile
in class Locator
- Parameters:
path
- the path to the file to look up
- Returns:
- true when file was found, otherwise false.
hasDirectory
public boolean hasDirectory(java.lang.String path)
- Returns true when directory was found.
- Specified by:
hasDirectory
in class Locator
- Parameters:
path
- the path to the directory to look up
- Returns:
- true when directory was found, otherwise false.
listContent
public java.util.List listContent(java.lang.String path)
- Returns a list of filename stored in path.
- Specified by:
listContent
in class Locator
- Parameters:
path
- the path to the directory where looking for files
- Returns:
- a list of filename stored in path.