Class: Omnizip::Formats::Rar::Models::RarEntry
- Inherits:
-
Object
- Object
- Omnizip::Formats::Rar::Models::RarEntry
- Defined in:
- lib/omnizip/formats/rar/models/rar_entry.rb
Overview
Represents a file entry in RAR archive Contains file metadata and extraction information
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#compressed_size ⇒ Object
Returns the value of attribute compressed_size.
-
#crc ⇒ Object
Returns the value of attribute crc.
-
#encrypted ⇒ Object
Returns the value of attribute encrypted.
-
#flags ⇒ Object
Returns the value of attribute flags.
-
#host_os ⇒ Object
Returns the value of attribute host_os.
-
#is_dir ⇒ Object
Returns the value of attribute is_dir.
-
#method ⇒ Object
Returns the value of attribute method.
-
#mtime ⇒ Object
Returns the value of attribute mtime.
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#split_after ⇒ Object
Returns the value of attribute split_after.
-
#split_before ⇒ Object
Returns the value of attribute split_before.
-
#version ⇒ Object
Returns the value of attribute version.
-
#volume_index ⇒ Object
Returns the value of attribute volume_index.
Instance Method Summary collapse
-
#directory? ⇒ Boolean
Check if entry is a directory.
-
#encrypted? ⇒ Boolean
Check if entry is encrypted.
-
#file? ⇒ Boolean
Check if entry is a file.
-
#initialize ⇒ RarEntry
constructor
Initialize RAR entry.
-
#split? ⇒ Boolean
Check if entry spans volumes.
Constructor Details
#initialize ⇒ RarEntry
Initialize RAR entry
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 16 def initialize @name = nil @size = 0 @compressed_size = 0 @crc = nil @is_dir = false @host_os = 0 @mtime = nil @attributes = nil @method = 0 @version = 0 @flags = 0 @volume_index = 0 @split_before = false @split_after = false @encrypted = false end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def attributes @attributes end |
#compressed_size ⇒ Object
Returns the value of attribute compressed_size.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def compressed_size @compressed_size end |
#crc ⇒ Object
Returns the value of attribute crc.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def crc @crc end |
#encrypted ⇒ Object
Returns the value of attribute encrypted.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def encrypted @encrypted end |
#flags ⇒ Object
Returns the value of attribute flags.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def flags @flags end |
#host_os ⇒ Object
Returns the value of attribute host_os.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def host_os @host_os end |
#is_dir ⇒ Object
Returns the value of attribute is_dir.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def is_dir @is_dir end |
#method ⇒ Object
Returns the value of attribute method.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def method @method end |
#mtime ⇒ Object
Returns the value of attribute mtime.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def mtime @mtime end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def size @size end |
#split_after ⇒ Object
Returns the value of attribute split_after.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def split_after @split_after end |
#split_before ⇒ Object
Returns the value of attribute split_before.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def split_before @split_before end |
#version ⇒ Object
Returns the value of attribute version.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def version @version end |
#volume_index ⇒ Object
Returns the value of attribute volume_index.
10 11 12 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 10 def volume_index @volume_index end |
Instance Method Details
#directory? ⇒ Boolean
Check if entry is a directory
37 38 39 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 37 def directory? @is_dir end |
#encrypted? ⇒ Boolean
Check if entry is encrypted
51 52 53 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 51 def encrypted? @encrypted end |
#file? ⇒ Boolean
Check if entry is a file
44 45 46 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 44 def file? !@is_dir end |
#split? ⇒ Boolean
Check if entry spans volumes
58 59 60 |
# File 'lib/omnizip/formats/rar/models/rar_entry.rb', line 58 def split? @split_before || @split_after end |