public class Untar extends Unarchiver
Modifier and Type | Method and Description |
---|---|
static Untar |
bzip2Unarchiver() |
com.google.common.collect.ImmutableSet<Path> |
extractArchive(Path archiveFile,
ProjectFilesystem filesystem,
Path filesystemRelativePath,
Optional<Path> stripPath,
PatternsMatcher entriesToExclude,
ExistingFileMode existingFileMode)
Extract a given archive to a destination
|
static Untar |
gzipUnarchiver() |
static Untar |
tarUnarchiver() |
static Untar |
xzUnarchiver() |
static Untar |
zstdUnarchiver() |
extractArchive, extractArchive, extractArchive, extractArchive
public static Untar tarUnarchiver()
public static Untar bzip2Unarchiver()
public static Untar gzipUnarchiver()
public static Untar xzUnarchiver()
public static Untar zstdUnarchiver()
public com.google.common.collect.ImmutableSet<Path> extractArchive(Path archiveFile, ProjectFilesystem filesystem, Path filesystemRelativePath, Optional<Path> stripPath, PatternsMatcher entriesToExclude, ExistingFileMode existingFileMode) throws IOException
Unarchiver
extractArchive
in class Unarchiver
archiveFile
- The path to the archivefilesystem
- The filesystem that will be extracted intofilesystemRelativePath
- The path relative to the filesystem to extract files intostripPath
- If provided, only files under this prefix will be extracted. This prefix
prefix will also be removed from the destination path. e.g. foo.tar.gz/foo/bar/baz with a
prefix of foo will extract bar/baz into the destination directory. If not provided, no
stripping is done.entriesToExclude
- Entries that match this matcher will not be extractedexistingFileMode
- How to handle existing filesIOException
- If the archive could not be extracted for any reason