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.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.util.stream.Stream<java.io.File>stream(java.io.File baseDir, java.lang.String... defaultIncludes)Return a stream of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.java.util.stream.Stream<java.io.File>stream(java.io.File baseDir, java.util.List<java.lang.String> defaultIncludes)Return a stream of files using the specified baseDir and the configured include and exclude Ant-style glob expressions.java.lang.StringtoString()
-
-
-
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)Return 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.
-
getFiles
public 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.- 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.
-
stream
public java.util.stream.Stream<java.io.File> stream(java.io.File baseDir, java.lang.String... defaultIncludes)Return a stream 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 stream of files.
-
stream
public java.util.stream.Stream<java.io.File> stream(java.io.File baseDir, java.util.List<java.lang.String> defaultIncludes)Return a stream 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 stream of files.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-