Package org.apache.tools.ant.types
Class FileList
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.FileList
- All Implemented Interfaces:
- Cloneable,- Iterable<Resource>,- 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.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classInner class corresponding to the <file> nested element.
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a nested <file> nested element.String[]Returns the list of files represented by this FileList.booleanAlways returns true.iterator()Fulfill the ResourceCollection contract.voidSet the dir attribute.voidSet the filenames attribute.voidMakes this instance in effect a reference to another FileList instance.intsize()Fulfill the ResourceCollection contract.Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toStringMethods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
- 
Constructor Details- 
FileListpublic FileList()The default constructor.
- 
FileListA copy constructor.- Parameters:
- filelist- a- FileListvalue
 
 
- 
- 
Method Details- 
setRefidMakes 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. - Overrides:
- setRefidin class- DataType
- Parameters:
- r- the reference to another filelist.
- Throws:
- BuildException- if an error occurs.
 
- 
setDirSet the dir attribute.- Parameters:
- dir- the directory this filelist is relative to.
- Throws:
- BuildException- if an error occurs
 
- 
getDir- Parameters:
- p- the current project
- Returns:
- the directory attribute
 
- 
setFilesSet the filenames attribute.- Parameters:
- filenames- a string containing filenames, separated by comma or by whitespace.
 
- 
getFilesReturns the list of files represented by this FileList.- Parameters:
- p- the current project
- Returns:
- the list of files represented by this FileList.
 
- 
addConfiguredFileAdd a nested <file> nested element.- Parameters:
- name- a configured file element with a name.
- Since:
- Ant 1.6.2
 
- 
iteratorFulfill the ResourceCollection contract.
- 
sizepublic int size()Fulfill the ResourceCollection contract.- Specified by:
- sizein interface- ResourceCollection
- Returns:
- number of elements as int.
- Since:
- Ant 1.7
 
- 
isFilesystemOnlypublic boolean isFilesystemOnly()Always returns true.- Specified by:
- isFilesystemOnlyin interface- ResourceCollection
- Returns:
- true indicating that all elements will be FileResources.
- Since:
- Ant 1.7
 
 
-