Class Tar


  • public class Tar
    extends Object
    This class allow to create tar files.
    Since:
    3.0
    Author:
    Laurent Jourdren
    • Constructor Detail

      • Tar

        public Tar​(Path inputDirectoryPath,
                   Path outputArchive)
            throws Aozan3Exception
        Constructor.
        Parameters:
        inputDirectoryPath - input tar file
        outputArchive - output directory for tar file content
        Throws:
        Aozan3Exception - if input archive or output directory path are not found or not readable/writable
    • Method Detail

      • getCompression

        public UnTar.Compression getCompression()
        Get tar compression.
        Returns:
        the tar compression
      • setCompression

        public void setCompression​(UnTar.Compression compression)
        Set the tar compression
        Parameters:
        compression - the tar compression
      • addExcludePattern

        public void addExcludePattern​(String pattern)
        Add a pattern to exclude.
        Parameters:
        pattern - pattern to exclude
      • getExcludePatterns

        public List<String> getExcludePatterns()
        Get the list of patterns to exclude.
        Returns:
        the list of patterns to exclude
      • addIncludePattern

        public void addIncludePattern​(String pattern)
        Add a pattern to exclude.
        Parameters:
        pattern - pattern to exclude
      • getIncludePatterns

        public List<String> getIncludePatterns()
        Get the list of patterns to include.
        Returns:
        the list of patterns to include