Constructor and Description |
---|
Unarchiver() |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableSet<Path> |
extractArchive(Path archiveFile,
ProjectFilesystem filesystem,
ExistingFileMode existingFileMode)
Extract a given archive to a destination
|
com.google.common.collect.ImmutableSet<Path> |
extractArchive(Path archiveFile,
ProjectFilesystem filesystem,
Path relativePath,
Optional<Path> stripPrefix,
ExistingFileMode existingFileMode)
Extract a given archive to a destination
|
abstract com.google.common.collect.ImmutableSet<Path> |
extractArchive(Path archiveFile,
ProjectFilesystem filesystem,
Path relativePath,
Optional<Path> stripPrefix,
PatternsMatcher entriesToExclude,
ExistingFileMode existingFileMode)
Extract a given archive to a destination
|
com.google.common.collect.ImmutableList<Path> |
extractArchive(ProjectFilesystemFactory projectFilesystemFactory,
Path archiveFile,
Path destination,
ExistingFileMode existingFileMode)
Extract a given archive to a specific directory
|
com.google.common.collect.ImmutableList<Path> |
extractArchive(ProjectFilesystemFactory projectFilesystemFactory,
Path archiveFile,
Path destination,
Optional<Path> stripPrefix,
PatternsMatcher entriesToExclude,
ExistingFileMode existingFileMode)
Extract a given archive to a specific directory
|
public com.google.common.collect.ImmutableSet<Path> extractArchive(Path archiveFile, ProjectFilesystem filesystem, Path relativePath, Optional<Path> stripPrefix, ExistingFileMode existingFileMode) throws IOException
archiveFile
- The path to the archivefilesystem
- The filesystem that will be extracted intorelativePath
- The path relative to the filesystem to extract files intostripPrefix
- 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.existingFileMode
- How to handle existing filesIOException
- If the archive could not be extracted for any reasonpublic abstract com.google.common.collect.ImmutableSet<Path> extractArchive(Path archiveFile, ProjectFilesystem filesystem, Path relativePath, Optional<Path> stripPrefix, PatternsMatcher entriesToExclude, ExistingFileMode existingFileMode) throws IOException
archiveFile
- The path to the archivefilesystem
- The filesystem that will be extracted intorelativePath
- The path relative to the filesystem to extract files intostripPrefix
- 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 reasonpublic com.google.common.collect.ImmutableSet<Path> extractArchive(Path archiveFile, ProjectFilesystem filesystem, ExistingFileMode existingFileMode) throws IOException
archiveFile
- The path to the archivefilesystem
- The filesystem that will be extracted intoexistingFileMode
- How to handle existing filesIOException
- If the archive could not be extracted for any reasonpublic com.google.common.collect.ImmutableList<Path> extractArchive(ProjectFilesystemFactory projectFilesystemFactory, Path archiveFile, Path destination, ExistingFileMode existingFileMode) throws IOException
projectFilesystemFactory
- A factory that creates filesystemsarchiveFile
- The path to the archivedestination
- The destination directory where the archive should be extracted toexistingFileMode
- How to handle existing filesInterruptedException
- If a filesystem could not be created in the destination directoryIOException
- If the archive could not be extracted for any reasonpublic com.google.common.collect.ImmutableList<Path> extractArchive(ProjectFilesystemFactory projectFilesystemFactory, Path archiveFile, Path destination, Optional<Path> stripPrefix, PatternsMatcher entriesToExclude, ExistingFileMode existingFileMode) throws IOException
projectFilesystemFactory
- A factory that creates filesystemsarchiveFile
- The path to the archivedestination
- The destination directory where the archive should be extracted tostripPrefix
- 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.existingFileMode
- How to handle existing filesIOException
- If the archive could not be extracted for any reason