Class: Omnizip::Formats::SevenZip::Models::FileEntry
- Inherits:
-
Object
- Object
- Omnizip::Formats::SevenZip::Models::FileEntry
- Includes:
- Entry
- 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.
- #entry_directory? ⇒ Boolean
- #entry_mtime ⇒ Object
- #entry_name ⇒ Object
- #entry_size ⇒ Object
-
#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
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 23 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.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def atime @atime end |
#attributes ⇒ Object
Returns the value of attribute attributes.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def attributes @attributes end |
#compressed_size ⇒ Object
Returns the value of attribute compressed_size.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def compressed_size @compressed_size end |
#compression_options ⇒ Object
Returns the value of attribute compression_options.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def @compression_options end |
#crc ⇒ Object
Returns the value of attribute crc.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def crc @crc end |
#ctime ⇒ Object
Returns the value of attribute ctime.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def ctime @ctime end |
#file_index ⇒ Object
Returns the value of attribute file_index.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def file_index @file_index end |
#folder_index ⇒ Object
Returns the value of attribute folder_index.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def folder_index @folder_index end |
#has_stream ⇒ Object
Returns the value of attribute has_stream.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def has_stream @has_stream end |
#inline_data ⇒ Object
Returns the value of attribute inline_data.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def inline_data @inline_data end |
#is_anti ⇒ Object
Returns the value of attribute is_anti.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def is_anti @is_anti end |
#is_dir ⇒ Object
Returns the value of attribute is_dir.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def is_dir @is_dir end |
#is_empty ⇒ Object
Returns the value of attribute is_empty.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def is_empty @is_empty end |
#mtime ⇒ Object
Returns the value of attribute mtime.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def mtime @mtime end |
#name ⇒ Object
Returns the value of attribute name.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def size @size end |
#source_path ⇒ Object
Returns the value of attribute source_path.
12 13 14 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 12 def source_path @source_path end |
Instance Method Details
#directory? ⇒ Boolean
Check if entry is a directory
44 45 46 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 44 def directory? @is_dir end |
#entry_directory? ⇒ Boolean
18 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 18 def entry_directory? = is_dir |
#entry_mtime ⇒ Object
20 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 20 def entry_mtime = mtime |
#entry_name ⇒ Object
17 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 17 def entry_name = name |
#entry_size ⇒ Object
19 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 19 def entry_size = size |
#file? ⇒ Boolean
Check if entry is a file
51 52 53 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 51 def file? !@is_dir end |
#has_stream? ⇒ Boolean
Check if entry has data stream
58 59 60 |
# File 'lib/omnizip/formats/seven_zip/models/file_entry.rb', line 58 def has_stream? @has_stream && !@is_empty end |