Class: PAKFile::FileEntrySystem

Inherits:
FileEntry show all
Defined in:
lib/pakspy.rb

Overview

File located on a file system, not in the pack

Instance Attribute Summary

Attributes inherited from FileEntry

#name

Instance Method Summary collapse

Constructor Details

#initialize(pack, path, name) ⇒ FileEntrySystem

Returns a new instance of FileEntrySystem.



216
217
218
219
220
# File 'lib/pakspy.rb', line 216

def initialize(pack, path, name)
  super pack
  @path = path
  @name = name
end

Instance Method Details

#readObject



222
223
224
225
226
227
# File 'lib/pakspy.rb', line 222

def read
  f = File.open @path, "rb"
  data = f.read
  f.close
  data
end