public class CompressArchiveUtil extends Object
Modifier and Type | Method and Description |
---|---|
static File |
archiveTARFiles(File base,
Iterable<File> files,
String archiveNameWithOutExtension) |
static void |
tar(java.nio.file.Path inputPath,
java.nio.file.Path outputPath,
boolean gZipped,
boolean childrenOnly)
Recursively tar file
|
public static void tar(java.nio.file.Path inputPath, java.nio.file.Path outputPath, boolean gZipped, boolean childrenOnly) throws IOException
inputPath
- file path can be directoryoutputPath
- where to put the archived filechildrenOnly
- if inputPath is directory and if childrenOnly is true, the archive will contain all of its children, else the archive
contains unique entry which is the inputPath itselfgZipped
- compress with gzip algorithmIOException
public static File archiveTARFiles(File base, Iterable<File> files, String archiveNameWithOutExtension) throws IOException
IOException
Copyright © 2016. All Rights Reserved.