Parent

Included Modules

Zip::CentralDirectory

Attributes

comment[R]

Public Instance Methods

each(&proc) click to toggle source

For iterating over the entries.

# File lib/zip/central_directory.rb, line 181
def each(&proc)
  @entry_set.each(&proc)
end
entries() click to toggle source

Returns an Enumerable containing the entries.

# File lib/zip/central_directory.rb, line 14
def entries
  @entry_set.entries
end
size() click to toggle source

Returns the number of entries in the central directory (and consequently in the zip archive).

# File lib/zip/central_directory.rb, line 187
def size
  @entry_set.size
end
start_buf(io) click to toggle source
# File lib/zip/central_directory.rb, line 157
def start_buf(io)
  begin
    io.seek(-MAX_END_OF_CDS_SIZE, IO::SEEK_END)
  rescue Errno::EINVAL
    io.seek(0, IO::SEEK_SET)
  end
  io.read
end
zip64_file?(buf) click to toggle source
# File lib/zip/central_directory.rb, line 153
def zip64_file?(buf)
  buf.rindex([ZIP64_END_OF_CDS].pack('V')) && buf.rindex([ZIP64_EOCD_LOCATOR].pack('V'))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.