|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
interface FileCollection extends java.lang.Iterable
A FileCollection represents a collection of files which you can query in certain ways. A file collection is often used to define a classpath, or to add files to a container.
You can obtain a FileCollection instance using org.gradle.api.Project#files.
Nested Class Summary | |
---|---|
enum |
FileCollection.AntType
|
Method Summary | |
---|---|
FileCollection
|
add(FileCollection collection)
Adds another collection to this collection. |
void
|
addToAntBuilder(java.lang.Object builder, java.lang.String nodeName, AntType type)
A { |
java.lang.Object
|
addToAntBuilder(java.lang.Object builder, java.lang.String nodeName)
Adds this collection to an Ant task as a nested node. |
java.lang.Object
|
asType(java.lang.Class type)
Converts this collection into an object of the specified type. |
FileTree
|
getAsFileTree()
Converts this collection to a { |
java.lang.String
|
getAsPath()
Returns the contents of this collection as a platform-specific path. |
Set
|
getFiles()
Returns the contents of this collection as a Set. |
File
|
getSingleFile()
Returns the content of this collection, asserting it contains exactly one file. |
FileCollection
|
plus(FileCollection collection)
Returns a { |
FileCollection
|
stopExecutionIfEmpty()
Throws a { |
FileCollection
|
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
FileCollection[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from interface java.lang.Iterable | |
---|---|
iterator |
Methods inherited from class java.lang.Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Method Detail |
---|
public FileCollection add(FileCollection collection)
Adds another collection to this collection. This is an optional operation.
public void addToAntBuilder(java.lang.Object builder, java.lang.String nodeName, AntType type)
A FileCollection represents a collection of files which you can query in certain ways. A file collection is often used to define a classpath, or to add files to a container.
You can obtain a FileCollection instance using org.gradle.api.Project#files.
public java.lang.Object addToAntBuilder(java.lang.Object builder, java.lang.String nodeName)
public java.lang.Object asType(java.lang.Class type)
Converts this collection into an object of the specified type. Supported types are: Collection, List, Set, Object[], File[], and File.
You can call this method in your build script using the as operator.
public FileTree getAsFileTree()
public java.lang.String getAsPath()
public Set getFiles()
public File getSingleFile()
public FileCollection plus(FileCollection collection)
Returns a FileCollection which contains the union of this collection and the given collection. The returned collection is live, and tracks changes to both source collections.
You can call this method in your build script using the + operator.
public FileCollection stopExecutionIfEmpty()
FileCollection valueOf(java.lang.String name)
FileCollection[] values()
Groovy Documentation