Package org.gradle.api.file
Schnittstelle CopyProcessingSpec
- Alle Superschnittstellen:
ContentFilterable
- Alle bekannten Implementierungsklassen:
AbstractArchiveTask,AbstractCopyTask,Copy,Ear,Jar,Jar,ProcessResources,Sync,Tar,War,Zip
Specifies the destination of a copy.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdirPermissions(Action<? super ConfigurableFilePermissions> configureAction) Configuration action for specifying directory access permissions.Adds an action to be applied to each file as it about to be copied into its destination.eachFile(Action<? super FileCopyDetails> action) Adds an action to be applied to each file as it is about to be copied into its destination.filePermissions(Action<? super ConfigurableFilePermissions> configureAction) Configuration action for specifying file access permissions.Veraltet.Property for querying and configuring directory access permissions.Veraltet.UsegetFilePermissions()instead.Property for querying and configuring file access permissions.Specifies the destination directory for a copy.Renames a source file.Renames files based on a regular expression.Renames files based on a regular expression.rename(Transformer<@Nullable String, String> renamer) Renames a source file.setDirMode(Integer mode) Veraltet.UsedirPermissions(Action)instead.setFileMode(Integer mode) Veraltet.UsefilePermissions(Action)instead.
-
Methodendetails
-
into
Specifies the destination directory for a copy. The destination is evaluated as perProject.file(Object).- Parameter:
destPath- Path to the destination directory for a Copy- Gibt zurück:
- this
-
rename
Renames a source file. The closure will be called with a single parameter, the name of the file. The closure should return a String object with a new target name. The closure may return null, in which case the original name will be used.- Parameter:
closure- rename closure- Gibt zurück:
- this
-
rename
Renames a source file. The function will be called with a single parameter, the name of the file. The function should return a new target name. The function may return null, in which case the original name will be used.- Parameter:
renamer- rename function- Gibt zurück:
- this
-
rename
Renames files based on a regular expression. Uses java.util.regex type of regular expressions. Note that the replace string should use the '$1' syntax to refer to capture groups in the source regular expression. Files that do not match the source regular expression will be copied with the original name.Example:
rename '(.*)_OEM_BLUE_(.*)', '$1$2'
would map the file 'style_OEM_BLUE_.css' to 'style.css'- Parameter:
sourceRegEx- Source regular expressionreplaceWith- Replacement string (use $ syntax for capture groups)- Gibt zurück:
- this
-
rename
Renames files based on a regular expression. Seerename(String, String).- Parameter:
sourceRegEx- Source regular expressionreplaceWith- Replacement string (use $ syntax for capture groups)- Gibt zurück:
- this
-
getFileMode
Veraltet.UsegetFilePermissions()instead. This method is scheduled for removal in Gradle 9.0.Returns the Unix permissions to use for the target files.nullmeans that existing permissions are preserved. It is dependent on the copy action implementation whether these permissions will actually be applied.- Gibt zurück:
- The file permissions, or
nullif existing permissions should be preserved.
-
setFileMode
Veraltet.UsefilePermissions(Action)instead. This method is scheduled for removal in Gradle 9.0.Sets the Unix permissions to use for the target files.nullmeans that existing permissions are preserved. It is dependent on the copy action implementation whether these permissions will actually be applied.- Parameter:
mode- The file permissions.- Gibt zurück:
- this
-
getDirMode
Veraltet.UsegetDirPermissions()instead. This method is scheduled for removal in Gradle 9.0.Returns the Unix permissions to use for the target directories.nullmeans that existing permissions are preserved. It is dependent on the copy action implementation whether these permissions will actually be applied.- Gibt zurück:
- The directory permissions, or
nullif existing permissions should be preserved.
-
setDirMode
Veraltet.UsedirPermissions(Action)instead. This method is scheduled for removal in Gradle 9.0.Sets the Unix permissions to use for the target directories.nullmeans that existing permissions are preserved. It is dependent on the copy action implementation whether these permissions will actually be applied.- Parameter:
mode- The directory permissions.- Gibt zurück:
- this
-
getFilePermissions
Property<ConfigurableFilePermissions> getFilePermissions()Property for querying and configuring file access permissions. If the property has no value set, that means that existing permissions are preserved. It is dependent on the copy action implementation whether these permissions will actually be applied. For details seeConfigurableFilePermissions.- Seit:
- 8.3
-
filePermissions
Configuration action for specifying file access permissions. For details seeConfigurableFilePermissions.- Seit:
- 8.3
-
getDirPermissions
Property<ConfigurableFilePermissions> getDirPermissions()Property for querying and configuring directory access permissions. If the property has no value set, that means that existing permissions are preserved. It is dependent on the copy action implementation whether these permissions will actually be applied. For details seeConfigurableFilePermissions.- Seit:
- 8.3
-
dirPermissions
Configuration action for specifying directory access permissions. For details seeConfigurableFilePermissions.- Seit:
- 8.3
-
eachFile
Adds an action to be applied to each file as it is about to be copied into its destination. The action can change the destination path of the file, filter the contents of the file, or exclude the file from the result entirely. Actions are executed in the order added, and are inherited from the parent spec.- Parameter:
action- The action to execute.- Gibt zurück:
- this
-
eachFile
Adds an action to be applied to each file as it about to be copied into its destination. The given closure is called with aFileCopyDetailsas its parameter. Actions are executed in the order added, and are inherited from the parent spec.- Parameter:
closure- The action to execute.- Gibt zurück:
- this
-
getDirPermissions()instead.