-
public class FileResolution
-
-
Constructor Summary
Constructors Constructor Description FileResolution(FileGroup group, String id, Function1<FileResolution, File> resolver)
-
Method Summary
Modifier and Type Method Description final Fileresolve()Resolve file immediatelly. final Unituse(Function2<FileResolution, File, Unit> operation)Perform operation on resolved file, but do not change it path (work in-place). final Unitthen(Function2<FileResolution, File, File> operation)Perform operation on resolved file with ability to change it path. final UnitcopyFile(File source, File target)Copy source file to target only if it does not exist. final UnitcopyToDirectory(File source, File targetDir)Copy source file to target directory only if target file does not exist. final FileTreearchiveTree(File archive)Read files from ZIP/TAR archive. final FilearchiveFile(File archive, String entryPattern)Read single file from ZIP/TAR archive. final Sequence<File>archiveFiles(File archive, String entriesPattern)Read files from ZIP/TAR archive. final FilecopyArchiveFile(File archive, String entryPattern, File target)Extract & copy single archive file and copy it to target location only if it does not exist. final UnitcopyArchiveFiles(File archive, String entriesPattern, File targetDir)Extract & copy archive files and copy them to target directory only if it each file does not exist. final FilegetDir()final FilegetFile()final FileGroupgetGroup()final StringgetId()-
-
Constructor Detail
-
FileResolution
FileResolution(FileGroup group, String id, Function1<FileResolution, File> resolver)
-
-
Method Detail
-
use
final Unit use(Function2<FileResolution, File, Unit> operation)
Perform operation on resolved file, but do not change it path (work in-place).
-
then
final Unit then(Function2<FileResolution, File, File> operation)
Perform operation on resolved file with ability to change it path.
-
copyFile
final Unit copyFile(File source, File target)
Copy source file to target only if it does not exist.
-
copyToDirectory
final Unit copyToDirectory(File source, File targetDir)
Copy source file to target directory only if target file does not exist.
-
archiveTree
final FileTree archiveTree(File archive)
Read files from ZIP/TAR archive.
-
archiveFile
final File archiveFile(File archive, String entryPattern)
Read single file from ZIP/TAR archive.
-
archiveFiles
final Sequence<File> archiveFiles(File archive, String entriesPattern)
Read files from ZIP/TAR archive.
-
copyArchiveFile
final File copyArchiveFile(File archive, String entryPattern, File target)
Extract & copy single archive file and copy it to target location only if it does not exist.
-
copyArchiveFiles
final Unit copyArchiveFiles(File archive, String entriesPattern, File targetDir)
Extract & copy archive files and copy them to target directory only if it each file does not exist.
-
-
-
-