Class: Resilience::FSDir::DirEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/resilience/fs_dir/dir_entry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ DirEntry

Returns a new instance of DirEntry.



17
18
19
20
21
22
# File 'lib/resilience/fs_dir/dir_entry.rb', line 17

def initialize(args={})
  @prefix   = args[:prefix]
  @name     = args[:name]
  @metadata = args[:metadata]
  @record   = args[:record]
end

Instance Attribute Details

#metadataObject

Returns the value of attribute metadata.



12
13
14
# File 'lib/resilience/fs_dir/dir_entry.rb', line 12

def 
  @metadata
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/resilience/fs_dir/dir_entry.rb', line 11

def name
  @name
end

#prefixObject

Returns the value of attribute prefix.



10
11
12
# File 'lib/resilience/fs_dir/dir_entry.rb', line 10

def prefix
  @prefix
end

#recordObject

metadata record



15
16
17
# File 'lib/resilience/fs_dir/dir_entry.rb', line 15

def record
  @record
end

Instance Method Details

#disk_offsetObject



28
29
30
# File 'lib/resilience/fs_dir/dir_entry.rb', line 28

def disk_offset
  image.offset + dir.record.attribute.pos
end

#fullnameObject



24
25
26
# File 'lib/resilience/fs_dir/dir_entry.rb', line 24

def fullname
  "#{prefix}\\#{name}"
end