Click or drag to resize
GridFSBucket Class
Represents a GridFS bucket.
Inheritance Hierarchy
SystemObject
  MongoDB.Driver.GridFSGridFSBucket

Namespace: MongoDB.Driver.GridFS
Assembly: MongoDB.Driver.GridFS (in MongoDB.Driver.GridFS.dll) Version: 2.1.0
Syntax
public class GridFSBucket : IGridFSBucket

The GridFSBucket type exposes the following members.

Constructors
  NameDescription
Public methodGridFSBucket
Initializes a new instance of the GridFSBucket class.
Top
Methods
  NameDescription
Public methodDeleteAsync(BsonValue, CancellationToken) Obsolete.
Deletes a file from GridFS.
Public methodDeleteAsync(ObjectId, CancellationToken)
Deletes a file from GridFS.
Public methodDownloadAsBytesAsync(BsonValue, GridFSDownloadOptions, CancellationToken) Obsolete.
Downloads a file stored in GridFS and returns it as a byte array.
Public methodDownloadAsBytesAsync(ObjectId, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
Public methodDownloadAsBytesByNameAsync
Downloads a file stored in GridFS and returns it as a byte array.
Public methodDownloadToStreamAsync(BsonValue, Stream, GridFSDownloadOptions, CancellationToken) Obsolete.
Downloads a file stored in GridFS and writes the contents to a stream.
Public methodDownloadToStreamAsync(ObjectId, Stream, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
Public methodDownloadToStreamByNameAsync
Downloads a file stored in GridFS and writes the contents to a stream.
Public methodDropAsync
Drops the files and chunks collections associated with this GridFS bucket.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindAsync
Finds matching entries from the files collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpenDownloadStreamAsync(BsonValue, GridFSDownloadOptions, CancellationToken) Obsolete.
Opens a Stream that can be used by the application to read data from a GridFS file.
Public methodOpenDownloadStreamAsync(ObjectId, GridFSDownloadOptions, CancellationToken)
Opens a Stream that can be used by the application to read data from a GridFS file.
Public methodOpenDownloadStreamByNameAsync
Opens a Stream that can be used by the application to read data from a GridFS file.
Public methodOpenUploadStreamAsync
Opens a Stream that can be used by the application to write data to a GridFS file.
Public methodRenameAsync(BsonValue, String, CancellationToken) Obsolete.
Renames a GridFS file.
Public methodRenameAsync(ObjectId, String, CancellationToken)
Renames a GridFS file.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUploadFromBytesAsync
Uploads a file (or a new revision of a file) to GridFS.
Public methodUploadFromStreamAsync
Uploads a file (or a new revision of a file) to GridFS.
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
Properties
  NameDescription
Public propertyDatabase
Gets the database where the GridFS files are stored.
Public propertyOptions
Gets the options.
Top
See Also