Class: Zip::ZipStreamableDirectory

Inherits:
ZipEntry show all
Defined in:
lib/zip/zip.rb

Overview

:nodoc:all

Constant Summary

Constants inherited from ZipEntry

Zip::ZipEntry::CDIR_ENTRY_STATIC_HEADER_LENGTH, Zip::ZipEntry::CENTRAL_DIRECTORY_ENTRY_SIGNATURE, Zip::ZipEntry::DEFLATED, Zip::ZipEntry::LOCAL_ENTRY_SIGNATURE, Zip::ZipEntry::LOCAL_ENTRY_STATIC_HEADER_LENGTH, Zip::ZipEntry::STORED

Instance Attribute Summary

Attributes inherited from ZipEntry

#comment, #compressed_size, #compression_method, #crc, #externalFileAttributes, #extra, #fstype, #localHeaderOffset, #name, #size, #zipfile

Instance Method Summary collapse

Methods inherited from ZipEntry

#<=>, #==, #cdir_header_size, #directory?, #file?, #get_raw_input_stream, #local_entry_offset, #local_header_size, #next_header_offset, #parent_as_string, read_c_dir_entry, #read_c_dir_entry, read_local_entry, #read_local_entry, #time, #time=, #to_s, #write_c_dir_entry, #write_local_entry

Constructor Details

#initialize(entry) ⇒ ZipStreamableDirectory

Returns a new instance of ZipStreamableDirectory.



1109
1110
1111
# File 'lib/zip/zip.rb', line 1109

def initialize(entry)
  super(entry)
end

Instance Method Details

#get_input_stream(&aProc) ⇒ Object



1113
1114
1115
1116
# File 'lib/zip/zip.rb', line 1113

def get_input_stream(&aProc)
  return yield(NullInputStream.instance) if block_given?
  NullInputStream.instance
end

#write_to_zip_output_stream(aZipOutputStream) ⇒ Object



1118
1119
1120
# File 'lib/zip/zip.rb', line 1118

def write_to_zip_output_stream(aZipOutputStream)
  aZipOutputStream.put_next_entry(self)
end