public class Zip extends Object
Modifier and Type | Method and Description |
---|---|
static void |
create(ProjectFilesystem projectFilesystem,
Collection<Path> pathsToIncludeInZip,
Path out)
Takes a sequence of paths relative to the project root and writes a zip file to
out
with the contents and structure that matches that of the specified paths. |
static com.google.common.collect.ImmutableList<String> |
getAllZipEntries(Path archiveAbsolutePath) |
static void |
walkBaseDirectoryToCreateEntries(ProjectFilesystem filesystem,
Map<String,Pair<CustomZipEntry,Optional<Path>>> entries,
Path baseDir,
com.google.common.collect.ImmutableSet<Path> paths,
boolean junkPaths,
ZipCompressionLevel compressionLevel)
Walks the file tree rooted in baseDirectory to create zip entries
|
static void |
writeEntriesToZip(ProjectFilesystem filesystem,
CustomZipOutputStream zipOut,
Map<String,Pair<CustomZipEntry,Optional<Path>>> entries)
Writes entries to zipOut stream.
|
public static void create(ProjectFilesystem projectFilesystem, Collection<Path> pathsToIncludeInZip, Path out) throws IOException
out
with the contents and structure that matches that of the specified paths.IOException
public static void walkBaseDirectoryToCreateEntries(ProjectFilesystem filesystem, Map<String,Pair<CustomZipEntry,Optional<Path>>> entries, Path baseDir, com.google.common.collect.ImmutableSet<Path> paths, boolean junkPaths, ZipCompressionLevel compressionLevel) throws IOException
IOException
public static void writeEntriesToZip(ProjectFilesystem filesystem, CustomZipOutputStream zipOut, Map<String,Pair<CustomZipEntry,Optional<Path>>> entries) throws IOException
IOException
public static com.google.common.collect.ImmutableList<String> getAllZipEntries(Path archiveAbsolutePath) throws IOException
IOException