public class FileResolution
| Constructor and Description |
|---|
FileResolution(FileGroup group,
java.lang.String id,
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.file.resolver.FileResolution,? extends java.io.File> resolver) |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
archiveFile(java.io.File archive,
java.lang.String entryPattern)
Read single file from ZIP/TAR archive.
|
kotlin.sequences.Sequence<java.io.File> |
archiveFiles(java.io.File archive,
java.lang.String entriesPattern)
Read files from ZIP/TAR archive.
|
org.gradle.api.file.FileTree |
archiveTree(java.io.File archive)
Read files from ZIP/TAR archive.
|
java.io.File |
copyArchiveFile(java.io.File archive,
java.lang.String entryPattern,
java.io.File target)
Extract & copy single archive file and copy it to target location only if it does not exist.
|
void |
copyArchiveFiles(java.io.File archive,
java.lang.String entriesPattern,
java.io.File targetDir)
Extract & copy archive files and copy them to target directory only if it each file does not exist.
|
void |
copyFile(java.io.File source,
java.io.File target)
Copy source file to target only if it does not exist.
|
java.io.File |
getDir() |
java.io.File |
getFile() |
FileGroup |
getGroup() |
java.lang.String |
getId() |
void |
then(kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.file.resolver.FileResolution,? super java.io.File,? extends java.io.File> operation)
Perform operation on resolved file with ability to change it path.
|
void |
use(kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.file.resolver.FileResolution,? super java.io.File,kotlin.Unit> operation)
Perform operation on resolved file, but do not change it path (work in-place).
|
public FileResolution(@NotNull
FileGroup group,
@NotNull
java.lang.String id,
@NotNull
kotlin.jvm.functions.Function1<? super com.cognifide.gradle.aem.common.file.resolver.FileResolution,? extends java.io.File> resolver)
@NotNull public java.io.File getDir()
@NotNull public java.io.File getFile()
public void use(@NotNull
kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.file.resolver.FileResolution,? super java.io.File,kotlin.Unit> operation)
Perform operation on resolved file, but do not change it path (work in-place).
public void then(@NotNull
kotlin.jvm.functions.Function2<? super com.cognifide.gradle.aem.common.file.resolver.FileResolution,? super java.io.File,? extends java.io.File> operation)
Perform operation on resolved file with ability to change it path.
public void copyFile(@NotNull
java.io.File source,
@NotNull
java.io.File target)
Copy source file to target only if it does not exist.
@NotNull
public org.gradle.api.file.FileTree archiveTree(@NotNull
java.io.File archive)
Read files from ZIP/TAR archive.
@NotNull
public java.io.File archiveFile(@NotNull
java.io.File archive,
@NotNull
java.lang.String entryPattern)
Read single file from ZIP/TAR archive.
@NotNull
public kotlin.sequences.Sequence<java.io.File> archiveFiles(@NotNull
java.io.File archive,
@NotNull
java.lang.String entriesPattern)
Read files from ZIP/TAR archive.
@NotNull
public java.io.File copyArchiveFile(@NotNull
java.io.File archive,
@NotNull
java.lang.String entryPattern,
@NotNull
java.io.File target)
Extract & copy single archive file and copy it to target location only if it does not exist.
public void copyArchiveFiles(@NotNull
java.io.File archive,
@NotNull
java.lang.String entriesPattern,
@NotNull
java.io.File targetDir)
Extract & copy archive files and copy them to target directory only if it each file does not exist.
@NotNull public FileGroup getGroup()
@NotNull public java.lang.String getId()