Class | Archive::Tar::Minitar::Reader
In: | lib/facets/more/minitar.rb
Parent: | Object

The class that reads a tar format archive from a data stream. The data stream may be sequential or random access, but certain features only work with random access data streams.

### Methods

close each each_entry new open rewind

### Classes and Modules

Module Archive::Tar::Minitar::Reader::InvalidEntryStream
Class Archive::Tar::Minitar::Reader::EntryStream

### Public Class methods

new(anIO)

Creates and returns a new Reader object.

open(anIO) {|reader| ...}

With no associated block, +Reader::open+ is a synonym for +Reader::new+. If the optional code block is given, it will be passed the new writer as an argument and the Reader object will automatically be closed when the block terminates. In this instance, +Reader::open+ returns the value of the block.

### Public Instance methods

close()
each(&block)

Iterates through each entry in the data stream.

each_entry() {|entry| ...}

Iterates through each entry in the data stream.

rewind()

Resets the read pointer to the beginning of data stream. Do not call this during a each or each_entry iteration. This only works with random access data streams that respond to rewind and pos.

[Validate]