Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.file
[Java] Interface CopySpec

    org.gradle.api.file.CopySourceSpec
      org.gradle.api.file.CopySpec

All Superinterfaces:
  CopySourceSpec

    public interface CopySpec
    extends CopySourceSpec

A set of specifications for copying files. This includes:

- source directories (multiples allowed)
- destination directory
- ANT like include patterns
- ANT like exclude patterns
- File relocating rules
- renaming rules
- content filters

CopySpecs may be nested by passing a closure to one of the from methods. The closure creates a child CopySpec and delegates methods in the closure to the child. Child CopySpecs inherit any values specified in the parent. This allows constructs like:

     into('webroot')
     exclude('**/.svn/**')
     from('src/main/webapp') {
        include '**/*.jsp'
     }
     from('src/main/js') {
        include '**/*.js'
     }

In this example, the `into` and `exclude` specifications at the root level are inherited by the two child CopySpecs.

Authors:
  Steve Appling

See Also:
  Copy Task
  Project.copy

Groovy Documentation