Module: Mongo::Grid::FSBucket::Stream
- Extended by:
- Stream
- Included in:
- Stream
- Defined in:
- lib/mongo/grid/stream.rb,
lib/mongo/grid/stream/read.rb,
lib/mongo/grid/stream/write.rb
Overview
A stream that reads and writes files from/to the FSBucket.
Defined Under Namespace
Constant Summary collapse
- READ_MODE =
The symbol for opening a read stream.
:r
- WRITE_MODE =
The symbol for opening a write stream.
:w
- MODE_MAP =
Mapping from mode to stream class.
{ READ_MODE => Read, WRITE_MODE => Write }.freeze
Instance Method Summary collapse
-
#get(fs, mode, options = {}) ⇒ Stream::Read, Stream::Write
Get a stream for reading/writing files from/to the FSBucket.
Instance Method Details
#get(fs, mode, options = {}) ⇒ Stream::Read, Stream::Write
Get a stream for reading/writing files from/to the FSBucket.
61 62 63 |
# File 'lib/mongo/grid/stream.rb', line 61 def get(fs, mode, = {}) MODE_MAP[mode].new(fs, ) end |