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 Type
    Method
    Description
    void
    Extract the archive.
    void
    extract(String path, File outputDirectory)
    Take 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 of FileSelector instances, which may be used to select the files to extract from the archive.
     
    boolean
     
    boolean
    Gets a flag indicating destination files are always overwritten.
    boolean
    Deprecated.
    this setting is now ignored.
    void
    setDestDirectory(File destDirectory)
     
    void
    setDestFile(File destFile)
     
    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.
    void
    setFileSelectors(org.codehaus.plexus.components.io.fileselectors.FileSelector[] selectors)
    Sets a set of FileSelector instances, which may be used to select the files to extract from the archive.
    void
    setIgnorePermissions(boolean ignorePermissions)
     
    void
    setOverwrite(boolean b)
    Should we overwrite files in dest, even if they are newer than the corresponding entries in the archive?
    void
    setSourceFile(File sourceFile)
     
    void
    setUseJvmChmod(boolean useJvmChmod)
    Deprecated.
    this setting is now ignored.
  • Method Details

    • extract

      void extract() throws ArchiverException
      Extract 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, or null if 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 - FileMapper to be used for rewriting each target path, or null if no rewriting shall happen.
      Since:
      3.7.0
    • setFileSelectors

      void setFileSelectors(org.codehaus.plexus.components.io.fileselectors.FileSelector[] selectors)
      Sets a set of FileSelector instances, 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 of FileSelector instances, 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