Class: CPEE::DStore::DoGet
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::DStore::DoGet
- Defined in:
- lib/cpee-dstore/implementation.rb
Overview
{{{
Instance Method Summary collapse
Instance Method Details
#response ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/cpee-dstore/implementation.rb', line 49 def response file = File.join(@a[0],@r[-2],@r[-1]) = file + '.mimetype' if File.exist?(file) && File.exist?() f = File.open(file,'rb') if @p.length > 0 && @p[0].name == 'tail' Riddl::Parameter::Complex.new('file',File.read().strip,f.tail(@p[0].value.to_i)) else Riddl::Parameter::Complex.new('file',File.read().strip,f) end else @status = 404 nil end end |