public class FileTree extends Object
| Constructor and Description |
|---|
FileTree() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExcludes(List<String> excludes)
Add an Ant-style glob to the exclude patterns.
|
void |
addExcludes(String... excludes)
Add an Ant-style glob to the exclude patterns.
|
void |
addFile(File file)
Can be used to add specific files to the return value of
getFiles(File, String...) and getFiles(File, List). |
void |
addIncludes(List<String> includes)
Add an Ant-style glob to the include patterns.
|
void |
addIncludes(String... includes)
Add an Ant-style glob to the include patterns.
|
List<File> |
getFiles(File baseDir,
List<String> defaultIncludes)
Return a list of files using the specified baseDir and the configured
include and exclude Ant-style glob expressions.
|
List<File> |
getFiles(File baseDir,
String... defaultIncludes)
Return a list of files using the specified baseDir and the configured
include and exclude Ant-style glob expressions.
|
public void addFile(File file)
getFiles(File, String...) and getFiles(File, List).file - A file to include in the return value of
getFiles(File, String...) and
getFiles(File, List).public void addIncludes(List<String> includes)
includes - Add an Ant-style globpublic void addIncludes(String... includes)
includes - Add an Ant-style globpublic void addExcludes(String... excludes)
excludes - Add an Ant-style globpublic void addExcludes(List<String> excludes)
excludes - Add an Ant-style globpublic List<File> getFiles(File baseDir, String... defaultIncludes) throws IOException
baseDir - The base directory for locating files.defaultIncludes - The default include patterns to use if no include
patterns were configured.IOException - If an exception occurs.public List<File> getFiles(File baseDir, List<String> defaultIncludes) throws IOException
baseDir - The base directory for locating files.defaultIncludes - The default include patterns to use if no include
patterns were configured.IOException - If an exception occurs.Copyright © 2021. All rights reserved.