ContentFilterable
AbstractArchiveTask
, AbstractCopyTask
, Copy
, Ear
, Jar
, Jar
, ProcessResources
, Sync
, Tar
, War
, Zip
public interface CopyProcessingSpec extends ContentFilterable
Modifier and Type | Method | Description |
---|---|---|
CopyProcessingSpec |
eachFile(Closure closure) |
Adds an action to be applied to each file as it about to be copied into its destination.
|
CopyProcessingSpec |
eachFile(Action<? super FileCopyDetails> action) |
Adds an action to be applied to each file as it is about to be copied into its destination.
|
java.lang.Integer |
getDirMode() |
Returns the Unix permissions to use for the target directories.
|
java.lang.Integer |
getFileMode() |
Returns the Unix permissions to use for the target files.
|
CopyProcessingSpec |
into(java.lang.Object destPath) |
Specifies the destination directory for a copy.
|
CopyProcessingSpec |
rename(Closure closure) |
Renames a source file.
|
CopyProcessingSpec |
rename(java.lang.String sourceRegEx,
java.lang.String replaceWith) |
Renames files based on a regular expression.
|
CopyProcessingSpec |
rename(java.util.regex.Pattern sourceRegEx,
java.lang.String replaceWith) |
Renames files based on a regular expression.
|
CopyProcessingSpec |
rename(Transformer<@Nullable java.lang.String,java.lang.String> renamer) |
Renames a source file.
|
CopyProcessingSpec |
setDirMode(java.lang.Integer mode) |
Sets the Unix permissions to use for the target directories.
|
CopyProcessingSpec |
setFileMode(java.lang.Integer mode) |
Sets the Unix permissions to use for the target files.
|
CopyProcessingSpec into(java.lang.Object destPath)
Project.file(Object)
.destPath
- Path to the destination directory for a CopyCopyProcessingSpec rename(Closure closure)
closure
- rename closureCopyProcessingSpec rename(Transformer<@Nullable java.lang.String,java.lang.String> renamer)
renamer
- rename functionCopyProcessingSpec rename(java.lang.String sourceRegEx, java.lang.String replaceWith)
Example:
rename '(.*)_OEM_BLUE_(.*)', '$1$2'would map the file 'style_OEM_BLUE_.css' to 'style.css'
sourceRegEx
- Source regular expressionreplaceWith
- Replacement string (use $ syntax for capture groups)CopyProcessingSpec rename(java.util.regex.Pattern sourceRegEx, java.lang.String replaceWith)
rename(String, String)
.sourceRegEx
- Source regular expressionreplaceWith
- Replacement string (use $ syntax for capture groups)@Nullable java.lang.Integer getFileMode()
null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.null
if existing permissions should be preserved.CopyProcessingSpec setFileMode(@Nullable java.lang.Integer mode)
null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.mode
- The file permissions.@Nullable java.lang.Integer getDirMode()
null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.null
if existing permissions should be preserved.CopyProcessingSpec setDirMode(@Nullable java.lang.Integer mode)
null
means that existing
permissions are preserved. It is dependent on the copy action implementation whether these permissions
will actually be applied.mode
- The directory permissions.CopyProcessingSpec eachFile(Action<? super FileCopyDetails> action)
action
- The action to execute.CopyProcessingSpec eachFile(@DelegatesTo(value=FileCopyDetails.class,strategy=1) Closure closure)
FileCopyDetails
as its parameter. Actions are executed in the order
added, and are inherited from the parent spec.closure
- The action to execute.