org.apache.tools.ant.types
Class FileList
- Cloneable, ResourceCollection
FileList represents an explicitly named list of files. FileLists
are useful when you want to capture a list of files regardless of
whether they currently exist. By contrast, FileSet operates as a
filter, only returning the name of a matched file if it currently
exists in the file system.
static class | FileList.FileName - Inner class corresponding to the <file> nested element.
|
checkAttributesAllowed , checkChildrenAllowed , circularReference , clone , dieOnCircularReference , dieOnCircularReference , dieOnCircularReference , getCheckedRef , getCheckedRef , getCheckedRef , getCheckedRef , getDataTypeName , getRefid , invokeCircularReferenceCheck , isChecked , isReference , noChildrenAllowed , setChecked , setRefid , toString , tooManyAttributes |
FileList
public FileList()
The default constructor.
FileList
protected FileList(FileList filelist)
A copy constructor.
filelist
- a FileList
value
addConfiguredFile
public void addConfiguredFile(FileList.FileName name)
Add a nested <file> nested element.
name
- a configured file element with a name.
getDir
public File getDir(Project p)
getFiles
public String[] getFiles(Project p)
Returns the list of files represented by this FileList.
- the list of files represented by this FileList.
getRef
protected FileList getRef(Project p)
Performs the check for circular references and returns the
referenced FileList.
- the FileList represented by a referenced filelist.
isFilesystemOnly
public boolean isFilesystemOnly()
Always returns true.
- isFilesystemOnly in interface ResourceCollection
- true indicating that all elements will be FileResources.
iterator
public Iterator iterator()
Fulfill the ResourceCollection contract.
- iterator in interface ResourceCollection
- an Iterator of Resources.
setDir
public void setDir(File dir)
throws BuildException
Set the dir attribute.
dir
- the directory this filelist is relative to.
setFiles
public void setFiles(String filenames)
Set the filenames attribute.
filenames
- a string contains filenames, separated by , or
by whitespace.
setRefid
public void setRefid(Reference r)
throws BuildException
Makes this instance in effect a reference to another FileList
instance.
You must not set another attribute or nest elements inside
this element if you make it a reference.
- setRefid in interface DataType
r
- the reference to another filelist.
size
public int size()
Fulfill the ResourceCollection contract.
- size in interface ResourceCollection
- number of elements as int.