Module Mongo::Grid::FSBucket::Stream
In: lib/mongo/grid/stream.rb
lib/mongo/grid/stream/write.rb
lib/mongo/grid/stream/read.rb

A stream that reads and writes files from/to the FSBucket.

@since 2.1.0

Methods

get  

Classes and Modules

Class Mongo::Grid::FSBucket::Stream::Read
Class Mongo::Grid::FSBucket::Stream::Write

Constants

READ_MODE = :r   The symbol for opening a read stream.

@since 2.1.0

WRITE_MODE = :w   The symbol for opening a write stream.

@since 2.1.0

MODE_MAP = { READ_MODE => Read, WRITE_MODE => Write   Mapping from mode to stream class.

@since 2.1.0

Public Instance methods

Get a stream for reading/writing files from/to the FSBucket.

@example Get a stream.

  FSBucket::Stream.get(fs, FSBucket::READ_MODE, options)

@param [ FSBucket ] fs The GridFS bucket object. @param [ FSBucket::READ_MODE, FSBucket::WRITE_MODE ] mode The stream mode. @param [ Hash ] options The stream options.

@return [ Stream::Read, Stream::Write ] The stream object.

@since 2.1.0

[Validate]