Class: GV::Valley::FileServer::FileSystem
- Inherits:
-
Object
- Object
- GV::Valley::FileServer::FileSystem
- Defined in:
- lib/gv/valley/file_server.rb
Constant Summary collapse
- CHUNKSIZE =
65536
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(path) ⇒ FileSystem
constructor
A new instance of FileSystem.
Constructor Details
#initialize(path) ⇒ FileSystem
Returns a new instance of FileSystem.
18 19 20 |
# File 'lib/gv/valley/file_server.rb', line 18 def initialize(path) @path = path end |
Instance Method Details
#get ⇒ Object
22 23 24 25 26 |
# File 'lib/gv/valley/file_server.rb', line 22 def get open(@path, 'rb') do |file| yield file.read(CHUNKSIZE) until file.eof? end end |