Package aQute.lib.io
Class FileTree
- java.lang.Object
-
- aQute.lib.io.FileTree
-
public class FileTree extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FileTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExcludes(java.lang.String... excludes)Add an Ant-style glob to the exclude patterns.voidaddExcludes(java.util.List<java.lang.String> excludes)Add an Ant-style glob to the exclude patterns.voidaddFile(java.io.File file)Can be used to add specific files to the return value ofgetFiles(File, String...)andgetFiles(File, List).voidaddIncludes(java.lang.String... includes)Add an Ant-style glob to the include patterns.voidaddIncludes(java.util.List<java.lang.String> includes)Add an Ant-style glob to the include patterns.java.util.List<java.io.File>getFiles(java.io.File baseDir, java.lang.String... defaultIncludes)Return a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.private java.util.List<java.io.File>getFiles(java.io.File baseDir, java.util.function.Predicate<java.lang.String> matches)java.util.List<java.io.File>getFiles(java.io.File baseDir, java.util.List<java.lang.String> defaultIncludes)Return a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.java.lang.StringtoString()
-
-
-
Field Detail
-
files
private final java.util.List<java.io.File> files
-
paths
private final PathSet paths
-
-
Method Detail
-
addFile
public void addFile(java.io.File file)
Can be used to add specific files to the return value ofgetFiles(File, String...)andgetFiles(File, List).- Parameters:
file- A file to include in the return value ofgetFiles(File, String...)andgetFiles(File, List).
-
addIncludes
public void addIncludes(java.util.List<java.lang.String> includes)
Add an Ant-style glob to the include patterns.- Parameters:
includes- Add an Ant-style glob
-
addIncludes
public void addIncludes(java.lang.String... includes)
Add an Ant-style glob to the include patterns.- Parameters:
includes- Add an Ant-style glob
-
addExcludes
public void addExcludes(java.lang.String... excludes)
Add an Ant-style glob to the exclude patterns.- Parameters:
excludes- Add an Ant-style glob
-
addExcludes
public void addExcludes(java.util.List<java.lang.String> excludes)
Add an Ant-style glob to the exclude patterns.- Parameters:
excludes- Add an Ant-style glob
-
getFiles
public java.util.List<java.io.File> getFiles(java.io.File baseDir, java.lang.String... defaultIncludes) throws java.io.IOExceptionReturn a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.- Parameters:
baseDir- The base directory for locating files.defaultIncludes- The default include patterns to use if no include patterns were configured.- Returns:
- A list of files.
- Throws:
java.io.IOException- If an exception occurs.
-
getFiles
public java.util.List<java.io.File> getFiles(java.io.File baseDir, java.util.List<java.lang.String> defaultIncludes) throws java.io.IOExceptionReturn a list of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.- Parameters:
baseDir- The base directory for locating files.defaultIncludes- The default include patterns to use if no include patterns were configured.- Returns:
- A list of files.
- Throws:
java.io.IOException- If an exception occurs.
-
getFiles
private java.util.List<java.io.File> getFiles(java.io.File baseDir, java.util.function.Predicate<java.lang.String> matches) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-