public class FileSet extends DataType implements Cloneable, SelectorContainer
Common base class for DirSet and FileSet.
| Constructor and Description |
|---|
FileSet()
Construct a new
FileSet. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(FileSelector selector)
Add an arbitary selector.
|
void |
addAnd(AndSelector selector)
Add an "And" selector entry on the selector list.
|
void |
addContains(ContainsSelector selector)
Add a contains selector entry on the selector list.
|
void |
addContainsRegexp(ContainsRegexpSelector selector)
Add a regular expression selector entry on the selector list.
|
void |
addCustom(ExtendSelector selector)
Add an extended selector entry on the selector list.
|
void |
addDate(DateSelector selector)
Add a selector date entry on the selector list.
|
void |
addDepend(DependSelector selector)
Add a depends selector entry on the selector list.
|
void |
addDepth(DepthSelector selector)
Add a depth selector entry on the selector list.
|
void |
addDifferent(DifferentSelector selector)
Add a DifferentSelector entry on the selector list.
|
void |
addFilename(FilenameSelector selector)
Add a selector filename entry on the selector list.
|
void |
addMajority(MajoritySelector selector)
Add a majority selector entry on the selector list.
|
void |
addNone(NoneSelector selector)
Add a "None" selector entry on the selector list.
|
void |
addNot(NotSelector selector)
Add a "Not" selector entry on the selector list.
|
void |
addOr(OrSelector selector)
Add an "Or" selector entry on the selector list.
|
void |
addPresent(PresentSelector selector)
Add a present selector entry on the selector list.
|
void |
addSize(SizeSelector selector)
Add a selector size entry on the selector list.
|
void |
addType(TypeSelector selector)
Add a selector type entry on the selector list.
|
void |
appendSelector(FileSelector selector)
Add a new selector into this container.
|
PatternSet.NameEntry |
createExclude()
Add a name entry to the exclude list.
|
PatternSet.NameEntry |
createInclude()
Add a name entry to the include list.
|
boolean |
getDefaultexcludes()
Whether default exclusions should be used or not.
|
File |
getDir()
Retrieves the base-directory for this instance.
|
DirectoryScanner |
getDirectoryScanner()
Returns the directory scanner needed to access the files to process.
|
FileSelector[] |
getSelectors()
Returns the set of selectors as an array.
|
boolean |
hasPatterns()
Indicates whether there are any patterns here.
|
boolean |
hasSelectors()
Indicates whether there are any selectors here.
|
boolean |
isFollowSymlinks()
Find out if the fileset wants to follow symbolic links.
|
int |
selectorCount()
Gives the count of the number of selectors in this container.
|
Enumeration<FileSelector> |
selectorElements()
Returns an enumerator for accessing the set of selectors.
|
void |
setCaseSensitive(boolean isCaseSensitive)
Sets case sensitivity of the file system.
|
void |
setDefaultexcludes(boolean useDefaultExcludes)
Sets whether default exclusions should be used or not.
|
void |
setDir(File dir)
Sets the base-directory for this instance.
|
void |
setExcludes(String excludes)
Appends
excludes to the current list of exclude
patterns. |
void |
setFile(File file)
Creates a single file fileset.
|
void |
setFollowSymlinks(boolean followSymlinks)
Sets whether or not symbolic links should be followed.
|
void |
setIncludes(String includes)
Appends
includes to the current list of include
patterns. |
void |
setupDirectoryScanner(FileScanner ds)
Set up the specified directory scanner against the specified project.
|
getDescription, isChecked, noChildrenAllowed, setChecked, setDescription, tooManyAttributespublic void setDir(File dir) throws Exception
dir - the directory's File instance.Exceptionpublic File getDir()
File.public PatternSet.NameEntry createInclude()
PatternSet.NameEntry.public PatternSet.NameEntry createExclude()
PatternSet.NameEntry.public void setFile(File file) throws Exception
file - the single File included in this
AbstractFileSet.Exceptionpublic void setIncludes(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 setExcludes(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 setDefaultexcludes(boolean useDefaultExcludes)
useDefaultExcludes - boolean.public boolean getDefaultexcludes()
public void setCaseSensitive(boolean isCaseSensitive)
isCaseSensitive - boolean.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 DirectoryScanner getDirectoryScanner() throws Exception
DirectoryScanner instance.Exceptionpublic void setupDirectoryScanner(FileScanner ds)
ds - a FileScanner instance.public boolean hasSelectors()
hasSelectors in interface SelectorContainerpublic boolean hasPatterns()
public int selectorCount()
selectorCount in interface SelectorContainerint.public FileSelector[] getSelectors()
getSelectors in interface SelectorContainerFileSelector[] of the selectors in this container.public Enumeration<FileSelector> selectorElements()
selectorElements in interface SelectorContainerEnumeration of selectors.public void appendSelector(FileSelector selector)
appendSelector in interface SelectorContainerselector - the new FileSelector to add.public void addAnd(AndSelector selector)
addAnd in interface SelectorContainerselector - the AndSelector to add.public void addOr(OrSelector selector)
addOr in interface SelectorContainerselector - the OrSelector to add.public void addNot(NotSelector selector)
addNot in interface SelectorContainerselector - the NotSelector to add.public void addNone(NoneSelector selector)
addNone in interface SelectorContainerselector - the NoneSelector to add.public void addMajority(MajoritySelector selector)
addMajority in interface SelectorContainerselector - the MajoritySelector to add.public void addDate(DateSelector selector)
addDate in interface SelectorContainerselector - the DateSelector to add.public void addSize(SizeSelector selector)
addSize in interface SelectorContainerselector - the SizeSelector to add.public void addDifferent(DifferentSelector selector)
addDifferent in interface SelectorContainerselector - the DifferentSelector to add.public void addFilename(FilenameSelector selector)
addFilename in interface SelectorContainerselector - the FilenameSelector to add.public void addType(TypeSelector selector)
addType in interface SelectorContainerselector - the TypeSelector to add.public void addCustom(ExtendSelector selector)
addCustom in interface SelectorContainerselector - the ExtendSelector to add.public void addContains(ContainsSelector selector)
addContains in interface SelectorContainerselector - the ContainsSelector to add.public void addPresent(PresentSelector selector)
addPresent in interface SelectorContainerselector - the PresentSelector to add.public void addDepth(DepthSelector selector)
addDepth in interface SelectorContainerselector - the DepthSelector to add.public void addDepend(DependSelector selector)
addDepend in interface SelectorContainerselector - the DependSelector to add.public void addContainsRegexp(ContainsRegexpSelector selector)
addContainsRegexp in interface SelectorContainerselector - the ContainsRegexpSelector to add.public void add(FileSelector selector)
add in interface SelectorContainerselector - the FileSelector to add.Copyright © 2001–2025. All rights reserved.