Class: Omnizip::Formats::Rar3::Reader::Entry

Inherits:
Object
  • Object
show all
Includes:
Entry
Defined in:
lib/omnizip/formats/rar3/reader.rb

Overview

RAR archive entry model (legacy shape)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, compressed_size: nil, uncompressed_size: nil, crc32: nil, compression_method: nil, modified_time: nil, attributes: nil, encrypted: nil, data_offset: nil, host_os: nil, salt: nil) ⇒ Entry

Returns a new instance of Entry.



87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/omnizip/formats/rar3/reader.rb', line 87

def initialize(name: nil, compressed_size: nil, uncompressed_size: nil,
               crc32: nil, compression_method: nil, modified_time: nil,
               attributes: nil, encrypted: nil, data_offset: nil,
               host_os: nil, salt: nil)
  @name = name
  @compressed_size = compressed_size
  @uncompressed_size = uncompressed_size
  @crc32 = crc32
  @compression_method = compression_method
  @modified_time = modified_time
  @attributes = attributes
  @encrypted = encrypted
  @data_offset = data_offset
  @host_os = host_os
  @salt = salt
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def attributes
  @attributes
end

#compressed_sizeObject

Returns the value of attribute compressed_size.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def compressed_size
  @compressed_size
end

#compression_methodObject

Returns the value of attribute compression_method.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def compression_method
  @compression_method
end

#crc32Object

Returns the value of attribute crc32.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def crc32
  @crc32
end

#data_offsetObject

Returns the value of attribute data_offset.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def data_offset
  @data_offset
end

#encryptedObject

Returns the value of attribute encrypted.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def encrypted
  @encrypted
end

#host_osObject

Returns the value of attribute host_os.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def host_os
  @host_os
end

#modified_timeObject

Returns the value of attribute modified_time.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def modified_time
  @modified_time
end

#nameObject

Returns the value of attribute name.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def name
  @name
end

#saltObject

Returns the value of attribute salt.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def salt
  @salt
end

#uncompressed_sizeObject

Returns the value of attribute uncompressed_size.



78
79
80
# File 'lib/omnizip/formats/rar3/reader.rb', line 78

def uncompressed_size
  @uncompressed_size
end

Instance Method Details

#entry_directory?Boolean

Returns:

  • (Boolean)


83
# File 'lib/omnizip/formats/rar3/reader.rb', line 83

def entry_directory? = false

#entry_mtimeObject



85
# File 'lib/omnizip/formats/rar3/reader.rb', line 85

def entry_mtime = modified_time

#entry_nameObject



82
# File 'lib/omnizip/formats/rar3/reader.rb', line 82

def entry_name = name

#entry_sizeObject



84
# File 'lib/omnizip/formats/rar3/reader.rb', line 84

def entry_size = uncompressed_size