Package aQute.lib.fileset
Class FileSet
- java.lang.Object
-
- aQute.lib.fileset.FileSet
-
public class FileSet extends java.lang.ObjectImplements a FileSet a la Ant/Gradle. A file set is a specification of a set of files. A file set specification contains a number of '/' separated segments. The last segment is Glob expression and the preceding segments specify either a directory, a wildcard directory ('*'), or a set of wildcard directories ('**').filesets ::= fileset ( ',' fileset )* fileset ::= ( segment '/' )* filematch segment ::= any | glob glob ::=
any ::= '**' filematch::= allfile | anyfile | glob anyfile ::= '**' glob allfile ::= '**'
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classFileSet.AnyDir(package private) static classFileSet.DFA(package private) static classFileSet.DirMatch(package private) static classFileSet.FileMatch(package private) static classFileSet.OrDFA
-
Field Summary
Fields Modifier and Type Field Description private java.io.Filebaseprivate FileSet.DFAdfaprivate java.lang.Stringsource
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static FileSet.DFAcompile(java.io.File base, java.lang.String filesetSpec)java.io.FilefindFirst(java.lang.String file)java.util.Set<java.io.File>getFiles()booleanhasOverlap(java.util.Collection<java.io.File> files)booleanisIncluded(java.io.File file)booleanisIncluded(java.lang.String relativePath)java.lang.StringtoString()
-
-
-
Field Detail
-
base
private final java.io.File base
-
dfa
private FileSet.DFA dfa
-
source
private java.lang.String source
-
-
Method Detail
-
compile
private static FileSet.DFA compile(java.io.File base, java.lang.String filesetSpec)
-
getFiles
public java.util.Set<java.io.File> getFiles()
-
isIncluded
public boolean isIncluded(java.io.File file)
-
isIncluded
public boolean isIncluded(java.lang.String relativePath)
-
hasOverlap
public boolean hasOverlap(java.util.Collection<java.io.File> files)
-
findFirst
public java.io.File findFirst(java.lang.String file)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-