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,WarUnArchiver,XZUnArchiver,ZipUnArchiver,ZstdUnArchiver
public interface UnArchiver
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidextract()Extract the archive.voidextract(String path, File outputDirectory)Take a path into the archive and extract it to the specified directory.FilegetDestDirectory()FilegetDestFile()org.codehaus.plexus.components.io.filemappers.FileMapper[]getFileMappers()Get chain of components which rewrite the target path of each unpacked file.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.FilegetSourceFile()booleanisIgnorePermissions()booleanisOverwrite()Gets a flag indicating destination files are always overwritten.booleanisUseJvmChmod()Deprecated.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 Detail
-
extract
void extract() throws ArchiverExceptionExtract the archive.- Throws:
ArchiverException
-
extract
void extract(String path, File outputDirectory) throws ArchiverException
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
void setDestDirectory(File destDirectory)
-
getDestFile
File getDestFile()
-
setDestFile
void setDestFile(File destFile)
-
getSourceFile
File getSourceFile()
-
setSourceFile
void setSourceFile(File sourceFile)
-
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 void setUseJvmChmod(boolean useJvmChmod)
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 boolean 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
-
-