lib/dea/directory.rb
def each
      F.open(@path, File::RDONLY | File::NOFOLLOW | File::BINARY) do |file|
        file.seek(@range.begin)
        remaining_len = @range.end-@range.begin+1
        while remaining_len > 0
          part = file.read([8192, remaining_len].min)
          break unless part
          remaining_len -= part.length

          yield part
        end
      end
    end
# based on Rack::File, just add the NOFOLLOW flag
based on Rack::File, just add the NOFOLLOW flag
based on Rack :: File just add the NOFOLLOW flag
def each
      F.open(@path, File::RDONLY | File::NOFOLLOW | File::BINARY) do |file|
        file.seek(@range.begin)
        remaining_len = @range.end-@range.begin+1
        while remaining_len > 0
          part = file.read([8192, remaining_len].min)
          break unless part
          remaining_len -= part.length
          yield part
        end
      end
    end
def each F . open ( @path , File :: RDONLY | File :: NOFOLLOW | File :: BINARY ) do | file | file . seek ( @range . begin ) remaining_len = @range . end - @range . begin + 1 while remaining_len > 0 part = file . read ( [ 8192 , remaining_len ] . min ) break unless part remaining_len -= part . length yield part end end end
based on Rack::File, just add the NOFOLLOW flag
based on Rack :: File just add the NOFOLLOW flag