Class Tar

  • All Implemented Interfaces:
    AdditionalInformationHandler, CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<Actor>, SizeOfHandler, Stoppable, StoppableWithFeedback, VariablesInspectionHandler, VariableChangeListener, Actor, ErrorHandler, InputConsumer, OutputProducer, Serializable, Comparable

    public class Tar
    extends AbstractMultiCompress
    Creates a Tar file containing one or more files. Outputs the filename of the Tar file generated. Always uses archives with GNU long filenamesupport. The compression (gzip or bzip2) is automatically determined based on the file extension.

    - accepts:
    - generates:

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to
        the console (0 = off).
        default: 0
        minimum: 0
    -name <java.lang.String> (property: name)
        The name of the actor.
        default: Tar
    -annotation <adams.core.base.BaseText> (property: annotations)
        The annotations to attach to this actor.
    -skip (property: skip)
        If set to true, transformation is skipped and the input token is just forwarded
        as it is.
    -stop-flow-on-error (property: stopFlowOnError)
        If set to true, the flow gets stopped in case this actor encounters an error;
         useful for critical actors.
    -output <> (property: output)
        The Tar file to create.
        default: ${CWD}
    -strip-path <java.lang.String> (property: stripPath)
        The regular expression for stripping the path (use '.*' to remove the path
    -buffer <int> (property: bufferSize)
        The size of the buffer in bytes for the data stream.
        default: 1024
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • Tar

        public Tar()
    • Method Detail

      • outputTipText

        public String outputTipText()
        Returns the tip text for this property.
        Specified by:
        outputTipText in class AbstractMultiCompress
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • compress

        protected String compress​(File[] inFiles)
        Adds all the files to archive.
        Specified by:
        compress in class AbstractMultiCompress
        inFiles - the files store in the
        null if successful, otherwise error message