Class: CPIO::ArchiveReader

Inherits:
Object
  • Object
show all
Defined in:
lib/excavate/extractors/cpio/cpio_old_format.rb

Overview

ArchiveWriter

Instance Method Summary collapse

Constructor Details

#initialize(io) ⇒ ArchiveReader

Returns a new instance of ArchiveReader.



262
263
264
# File 'lib/excavate/extractors/cpio/cpio_old_format.rb', line 262

def initialize(io)
  @io = io
end

Instance Method Details

#each_entryObject



266
267
268
269
270
271
# File 'lib/excavate/extractors/cpio/cpio_old_format.rb', line 266

def each_entry
  @io.rewind
  while (entry = ArchiveEntry.from(@io)) && !entry.trailer?
    yield(entry)
  end
end