org.glite.security.util
Class DirectoryList
java.lang.Object
org.glite.security.util.DirectoryList
public class DirectoryList
- extends java.lang.Object
This class lists all the files defined in the constructor.
The definitions can be in three forms.
1. absolute file (/tmp/test.txt)
2. absolute path (/tmp)
3. a wildcard file (/tmp/*.txt)
In case 1. only the file is returned.
In case 2. all files in the directory are returned
In case 3. all the files in the directory tmp having
the .txt ending are returned.
The returning means the return of the getListing method.
- Author:
- Joni Hahkala
Created on December 10, 2001, 6:50 PM
Constructor Summary |
DirectoryList(java.lang.String path)
Creates a new instance of DirectoryList |
Method Summary |
java.util.List<java.io.File> |
getListing()
Used to get the file listing, the list of files matching
the definition in constructor. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectoryList
public DirectoryList(java.lang.String path)
throws java.io.IOException
- Creates a new instance of DirectoryList
- Parameters:
path
- The file definition, see class description above.
- Throws:
java.io.IOException
- Thrown if the path was invalid
getListing
public java.util.List<java.io.File> getListing()
- Used to get the file listing, the list of files matching
the definition in constructor.
- Returns:
- Returns the list of files matching the definition
given in the constructor.