Package org.codehaus.plexus.archiver
Interface UnArchiver
- All Known Implementing Classes:
AbstractUnArchiver,AbstractZipUnArchiver,BZip2UnArchiver,CarUnArchiver,EarUnArchiver,EsbUnArchiver,GZipUnArchiver,JarUnArchiver,NarUnArchiver,ParUnArchiver,RarUnArchiver,SarUnArchiver,SnappyUnArchiver,SwcUnArchiver,TarBZip2UnArchiver,TarGZipUnArchiver,TarSnappyUnArchiver,TarUnArchiver,TarXZUnArchiver,TarZstdUnArchiver,TBZ2UnArchiver,TGZUnArchiver,TXZUnArchiver,TZstdUnArchiver,WarUnArchiver,XZUnArchiver,ZipUnArchiver,ZstdUnArchiver
public interface UnArchiver
-
Method Summary
Modifier and TypeMethodDescriptionvoidextract()Extract the archive.voidTake a path into the archive and extract it to the specified directory.org.codehaus.plexus.components.io.filemappers.FileMapper[]Get chain of components which rewrite the target path of each unpacked file.org.codehaus.plexus.components.io.fileselectors.FileSelector[]Returns a set ofFileSelectorinstances, which may be used to select the files to extract from the archive.booleanbooleanGets a flag indicating destination files are always overwritten.booleanDeprecated.this setting is now ignored.voidsetDestDirectory(File destDirectory) voidsetDestFile(File destFile) voidsetFileMappers(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) Sets chain of components to be used for rewriting target path of each unpacked file.voidsetFileSelectors(org.codehaus.plexus.components.io.fileselectors.FileSelector[] selectors) Sets a set ofFileSelectorinstances, which may be used to select the files to extract from the archive.voidsetIgnorePermissions(boolean ignorePermissions) voidsetOverwrite(boolean b) Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?voidsetSourceFile(File sourceFile) voidsetUseJvmChmod(boolean useJvmChmod) Deprecated.this setting is now ignored.
-
Method Details
-
extract
Extract the archive.- Throws:
ArchiverException
-
extract
Take a path into the archive and extract it to the specified directory.- Parameters:
path- Path inside the archive to be extracted.outputDirectory- Directory to extract to.- Throws:
ArchiverException
-
getDestDirectory
File getDestDirectory() -
setDestDirectory
-
getDestFile
File getDestFile() -
setDestFile
-
getSourceFile
File getSourceFile() -
setSourceFile
-
isOverwrite
boolean isOverwrite()Gets a flag indicating destination files are always overwritten.- Returns:
true, if destination files are overwritten, even if they are newer than the corresponding entry in the archive.- Since:
- 3.4
-
setOverwrite
void setOverwrite(boolean b) Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive? -
getFileMappers
org.codehaus.plexus.components.io.filemappers.FileMapper[] getFileMappers()Get chain of components which rewrite the target path of each unpacked file.- Returns:
FileMappers to be used for rewriting each target path, ornullif no rewriting shall happen.- Since:
- 3.7.0
-
setFileMappers
void setFileMappers(org.codehaus.plexus.components.io.filemappers.FileMapper[] fileMappers) Sets chain of components to be used for rewriting target path of each unpacked file.- Parameters:
fileMappers-FileMapperto be used for rewriting each target path, ornullif no rewriting shall happen.- Since:
- 3.7.0
-
setFileSelectors
void setFileSelectors(org.codehaus.plexus.components.io.fileselectors.FileSelector[] selectors) Sets a set ofFileSelectorinstances, which may be used to select the files to extract from the archive. If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors. -
getFileSelectors
org.codehaus.plexus.components.io.fileselectors.FileSelector[] getFileSelectors()Returns a set ofFileSelectorinstances, which may be used to select the files to extract from the archive. If file selectors are present, then a file is only extracted, if it is confirmed by all file selectors. -
setUseJvmChmod
Deprecated.this setting is now ignored. The jvm is always used.to use or not the jvm method for file permissions: user all not active for group permissions- Parameters:
useJvmChmod-- Since:
- 1.1
-
isUseJvmChmod
Deprecated.this setting is now ignored. The jvm is always used.- Returns:
- Since:
- 1.1
-
isIgnorePermissions
boolean isIgnorePermissions()- Since:
- 1.1
-
setIgnorePermissions
void setIgnorePermissions(boolean ignorePermissions) - Since:
- 1.1
-