Package jetbrains.buildServer.util.impl
Class ZipArchiveExtractor
- java.lang.Object
-
- jetbrains.buildServer.util.impl.ZipArchiveExtractor
-
- All Implemented Interfaces:
TeamCityExtension,ArchiveExtractor
public class ZipArchiveExtractor extends Object implements ArchiveExtractor
-
-
Constructor Summary
Constructors Constructor Description ZipArchiveExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidextractFiles(File archive, ArchiveFileSelector selector)Extracts files from given archive filtered by file selectorMap<String,Long>getEntitiesSize(File archive)Map<String,Integer>getEntitiesUnixPermissions(File archive)booleanisSupported(File archive)Detect whether archive can be extract by this extractorvoidsetEncoding(String encoding)
-
-
-
Method Detail
-
setEncoding
public void setEncoding(@NotNull String encoding)
-
isSupported
public boolean isSupported(@NotNull File archive)Description copied from interface:ArchiveExtractorDetect whether archive can be extract by this extractor- Specified by:
isSupportedin interfaceArchiveExtractor- Parameters:
archive- path to archive- Returns:
- whether archive can be extract by this extractor
-
getEntitiesSize
public Map<String,Long> getEntitiesSize(@NotNull File archive) throws IOException
- Specified by:
getEntitiesSizein interfaceArchiveExtractor- Parameters:
archive- archive to be processed- Returns:
- map of entities name to uncompressed size on this entry, same names which are used in
ArchiveFileSelectorwill be used as keys, -1 as size may be returned if size is unknown - Throws:
IOException- Error occurred during extraction
-
getEntitiesUnixPermissions
public Map<String,Integer> getEntitiesUnixPermissions(@NotNull File archive) throws IOException
- Specified by:
getEntitiesUnixPermissionsin interfaceArchiveExtractor- Parameters:
archive- archive to be processed- Returns:
- map of entities name to an integer representation of Unix permissions for this entry, same names which are used in
ArchiveFileSelectorwill be used as keys, empty map if unix permissions are not available in the map - Throws:
IOException- Error occurred during extraction
-
extractFiles
public void extractFiles(@NotNull File archive, @NotNull ArchiveFileSelector selector) throws IOExceptionDescription copied from interface:ArchiveExtractorExtracts files from given archive filtered by file selector- Specified by:
extractFilesin interfaceArchiveExtractor- Parameters:
archive- archive to be processedselector- selector for files within the archive- Throws:
IOException- Error occurred during extraction
-
-