public class Files extends AbstractSelectorContainer implements ResourceCollection
description, location, project
Modifier | Constructor and Description |
---|---|
|
Files()
Construct a new
Files collection. |
protected |
Files(Files f)
Construct a new
Files collection, shallowly cloned
from the specified Files . |
Modifier and Type | Method and Description |
---|---|
void |
appendExcludes(java.lang.String[] excludes)
Append
excludes to the current list of include
patterns. |
void |
appendIncludes(java.lang.String[] includes)
Append
includes to the current list of include
patterns. |
void |
appendSelector(FileSelector selector)
Add a new selector into this container.
|
java.lang.Object |
clone()
Create a deep clone of this instance, except for the nested selectors
(the list of selectors is a shallow clone of this instance's list).
|
PatternSet.NameEntry |
createExclude()
Add a name entry to the exclude list.
|
PatternSet.NameEntry |
createExcludesFile()
Add a name entry to the excludes files list.
|
PatternSet.NameEntry |
createInclude()
Add a name entry to the include list.
|
PatternSet.NameEntry |
createIncludesFile()
Add a name entry to the include files list.
|
PatternSet |
createPatternSet()
Create a nested patternset.
|
boolean |
getDefaultexcludes()
Get whether default exclusions should be used or not.
|
protected Files |
getRef()
Perform the check for circular references and return the
referenced Files collection.
|
boolean |
hasPatterns()
Find out whether this Files collection has patterns.
|
boolean |
isCaseSensitive()
Find out if this Files collection is case-sensitive.
|
boolean |
isFilesystemOnly()
Always returns true.
|
boolean |
isFollowSymlinks()
Find out whether symbolic links should be followed.
|
java.util.Iterator |
iterator()
Fulfill the ResourceCollection contract.
|
java.lang.String[] |
mergeExcludes(Project p)
Get the merged exclude patterns for this Files collection.
|
java.lang.String[] |
mergeIncludes(Project p)
Get the merged include patterns for this Files collection.
|
PatternSet |
mergePatterns(Project p)
Get the merged patterns for this Files collection.
|
void |
setCaseSensitive(boolean caseSensitive)
Set case-sensitivity of the Files collection.
|
void |
setDefaultexcludes(boolean useDefaultExcludes)
Set whether default exclusions should be used or not.
|
void |
setExcludes(java.lang.String excludes)
Append
excludes to the current list of exclude
patterns. |
void |
setExcludesfile(java.io.File excl)
Set the
File containing the excludes patterns. |
void |
setFollowSymlinks(boolean followSymlinks)
Set whether or not symbolic links should be followed.
|
void |
setIncludes(java.lang.String includes)
Append
includes to the current list of include
patterns. |
void |
setIncludesfile(java.io.File incl)
Set the
File containing the includes patterns. |
void |
setRefid(Reference r)
Make this instance in effect a reference to another instance.
|
int |
size()
Fulfill the ResourceCollection contract.
|
java.lang.String |
toString()
Format this Files collection as a String.
|
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addReadable, addSelector, addSize, addType, addWritable, dieOnCircularReference, getSelectors, hasSelectors, selectorCount, selectorElements, validate
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public Files()
Files
collection.protected Files(Files f)
Files
collection, shallowly cloned
from the specified Files
.f
- the Files
to use as a template.public void setRefid(Reference r) throws BuildException
You must not set another attribute or nest elements inside this element if you make it a reference.
setRefid
in class DataType
r
- the Reference
to use.BuildException
- if there is a problem.public PatternSet createPatternSet()
PatternSet
.public PatternSet.NameEntry createInclude()
PatternSet.NameEntry
.public PatternSet.NameEntry createIncludesFile()
PatternSet.NameEntry
.public PatternSet.NameEntry createExclude()
PatternSet.NameEntry
.public PatternSet.NameEntry createExcludesFile()
PatternSet.NameEntry
.public void setIncludes(java.lang.String includes)
includes
to the current list of include
patterns.
Patterns may be separated by a comma or a space.
includes
- the String
containing the include patterns.public void appendIncludes(java.lang.String[] includes)
includes
to the current list of include
patterns.includes
- array containing the include patterns.public void setExcludes(java.lang.String excludes)
excludes
to the current list of exclude
patterns.
Patterns may be separated by a comma or a space.
excludes
- the String
containing the exclude patterns.public void appendExcludes(java.lang.String[] excludes)
excludes
to the current list of include
patterns.excludes
- array containing the exclude patterns.public void setIncludesfile(java.io.File incl) throws BuildException
File
containing the includes patterns.incl
- File
instance.BuildException
- if there is a problem.public void setExcludesfile(java.io.File excl) throws BuildException
File
containing the excludes patterns.excl
- File
instance.BuildException
- if there is a problem.public void setDefaultexcludes(boolean useDefaultExcludes)
useDefaultExcludes
- boolean
.public boolean getDefaultexcludes()
public void setCaseSensitive(boolean caseSensitive)
caseSensitive
- boolean
.public boolean isCaseSensitive()
boolean
indicating whether the Files
collection is case-sensitive.public void setFollowSymlinks(boolean followSymlinks)
followSymlinks
- whether or not symbolic links should be followed.public boolean isFollowSymlinks()
boolean
indicating whether symbolic links
should be followed.public java.util.Iterator iterator()
iterator
in interface ResourceCollection
public int size()
size
in interface ResourceCollection
public boolean hasPatterns()
public void appendSelector(FileSelector selector)
appendSelector
in interface SelectorContainer
appendSelector
in class AbstractSelectorContainer
selector
- the new FileSelector
to add.public java.lang.String toString()
toString
in class AbstractSelectorContainer
String
.public java.lang.Object clone()
clone
in class AbstractSelectorContainer
public java.lang.String[] mergeIncludes(Project p)
p
- Project instance.public java.lang.String[] mergeExcludes(Project p)
p
- Project instance.public PatternSet mergePatterns(Project p)
p
- Project instance.public boolean isFilesystemOnly()
isFilesystemOnly
in interface ResourceCollection
protected Files getRef()
FileCollection
.