Package jetbrains.buildServer.util
Interface ArchiveExtractor
-
- All Superinterfaces:
TeamCityExtension
- All Known Implementing Classes:
AgentAlteringZipArchiveExtractor
,AlteringZipArchiveExtractor
,CommonsCompressArchiveExtractorBase
,ServerAlteringZipArchiveExtractor
,ServerAwareTarArchiveExtractor
,SevenZArchiveExtractor
,StreamZipArchiveExtractor
,TarArchiveExtractor
,ZipArchiveExtractor
public interface ArchiveExtractor extends TeamCityExtension
Interface for archive extractors (spring singletons).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
extractFiles(File archive, ArchiveFileSelector selector)
Extracts files from given archive filtered by file selectordefault Map<String,Long>
getEntitiesSize(File archive)
default Map<String,Integer>
getEntitiesUnixPermissions(File archive)
boolean
isSupported(File archive)
Detect whether archive can be extract by this extractor
-
-
-
Method Detail
-
isSupported
boolean isSupported(@NotNull File archive)
Detect whether archive can be extract by this extractor- Parameters:
archive
- path to archive- Returns:
- whether archive can be extract by this extractor
-
extractFiles
void extractFiles(@NotNull File archive, @NotNull ArchiveFileSelector selector) throws IOException
Extracts files from given archive filtered by file selector- Parameters:
archive
- archive to be processedselector
- selector for files within the archive- Throws:
IOException
- Error occurred during extraction
-
getEntitiesSize
default Map<String,Long> getEntitiesSize(@NotNull File archive) throws IOException
- Parameters:
archive
- archive to be processed- Returns:
- map of entities name to uncompressed size on this entry, same names which are used in
ArchiveFileSelector
will be used as keys, -1 as size may be returned if size is unknown - Throws:
IOException
- Error occurred during extraction- Since:
- 2022.10
-
getEntitiesUnixPermissions
default Map<String,Integer> getEntitiesUnixPermissions(@NotNull File archive) throws IOException
- 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
ArchiveFileSelector
will be used as keys, empty map if unix permissions are not available in the map - Throws:
IOException
- Error occurred during extraction- Since:
- 2023.03
-
-