Class: Omnizip::Formats::SevenZip::Models::FileEntry
- Inherits:
-
Object
- Object
- Omnizip::Formats::SevenZip::Models::FileEntry
- Defined in:
- lib/omnizip/formats/seven_zip/models/file_entry.rb
Overview
Represents a file entry in .7z archive Contains file metadata, attributes, and extraction information
Instance Attribute Summary collapse
-
#atime ⇒ Object
Returns the value of attribute atime.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#compressed_size ⇒ Object
Returns the value of attribute compressed_size.
-
#compression_options ⇒ Object
Returns the value of attribute compression_options.
-
#crc ⇒ Object
Returns the value of attribute crc.
-
#ctime ⇒ Object
Returns the value of attribute ctime.
-
#file_index ⇒ Object
Returns the value of attribute file_index.
-
#folder_index ⇒ Object
Returns the value of attribute folder_index.
-
#has_stream ⇒ Object
Returns the value of attribute has_stream.
-
#inline_data ⇒ Object
Returns the value of attribute inline_data.
-
#is_anti ⇒ Object
Returns the value of attribute is_anti.
-
#is_dir ⇒ Object
Returns the value of attribute is_dir.
-
#is_empty ⇒ Object
Returns the value of attribute is_empty.
-
#mtime ⇒ Object
Returns the value of attribute mtime.
-
#name ⇒ Object
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#source_path ⇒ Object
Returns the value of attribute source_path.
Instance Method Summary collapse
-
#directory? ⇒ Boolean
Check if entry is a directory.
-
#file? ⇒ Boolean
Check if entry is a file.
-
#has_stream? ⇒ Boolean
Check if entry has data stream.
-
#initialize ⇒ FileEntry
constructor
Initialize file entry.
Constructor Details
#initialize ⇒ FileEntry
Initialize file entry
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 16 def initialize @name = nil @size = 0 @compressed_size = 0 @crc = nil @is_dir = false @is_empty = false @is_anti = false @has_stream = true @mtime = nil @atime = nil @ctime = nil @attributes = nil @folder_index = nil @file_index = nil @source_path = nil end |
Instance Attribute Details
#atime ⇒ Object
Returns the value of attribute atime.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def atime @atime end |
#attributes ⇒ Object
Returns the value of attribute attributes.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_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/seven_zip/models/file_entry.rb', line 10 def compressed_size @compressed_size end |
#compression_options ⇒ Object
Returns the value of attribute compression_options.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def @compression_options end |
#crc ⇒ Object
Returns the value of attribute crc.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def crc @crc end |
#ctime ⇒ Object
Returns the value of attribute ctime.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def ctime @ctime end |
#file_index ⇒ Object
Returns the value of attribute file_index.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def file_index @file_index end |
#folder_index ⇒ Object
Returns the value of attribute folder_index.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def folder_index @folder_index end |
#has_stream ⇒ Object
Returns the value of attribute has_stream.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def has_stream @has_stream end |
#inline_data ⇒ Object
Returns the value of attribute inline_data.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def inline_data @inline_data end |
#is_anti ⇒ Object
Returns the value of attribute is_anti.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def is_anti @is_anti end |
#is_dir ⇒ Object
Returns the value of attribute is_dir.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def is_dir @is_dir end |
#is_empty ⇒ Object
Returns the value of attribute is_empty.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def is_empty @is_empty end |
#mtime ⇒ Object
Returns the value of attribute mtime.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def mtime @mtime end |
#name ⇒ Object
Returns the value of attribute name.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def size @size end |
#source_path ⇒ Object
Returns the value of attribute source_path.
10 11 12 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 10 def source_path @source_path end |
Instance Method Details
#directory? ⇒ Boolean
Check if entry is a directory
37 38 39 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 37 def directory? @is_dir end |
#file? ⇒ Boolean
Check if entry is a file
44 45 46 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 44 def file? !@is_dir end |
#has_stream? ⇒ Boolean
Check if entry has data stream
51 52 53 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 51 def has_stream? @has_stream && !@is_empty end |