tar
    Preparing search index...

    Class AppendScan

    Finds the place in an archive file where new entries go: the end of the last complete entry before the first block that is not a valid header. A PAX or GNU header with no entry after it is not a complete entry.

    Read the file into buf at pos, and call push(), until it returns false. The bodies of the entries are not read.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Parameters

      • size: number

        the size of the file

      • codecs: Codec[] = []
      • Optionalmtimes: Map<string, Date>

        gets the path and the mtime of each complete entry

      Returns AppendScan

    Properties

    buf: Uint8Array = ...
    pos: number = 0

    The place in the file of the next read.

    Accessors

    • get position(): number

      The place in the file where new entries go.

      Returns number

    • get want(): number

      The number of bytes to read into buf at pos.

      Returns number

    Methods

    • Parse the first length bytes of buf. False if the place is found. Throws if the file is compressed.

      Parameters

      • length: number

      Returns boolean