Click or drag to resize

GridFSBucket Class

Represents a GridFS bucket.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.GridFS.GridFSBucket<ObjectId>
    MongoDB.Driver.GridFS.GridFSBucket

Namespace:  MongoDB.Driver.GridFS
Assembly:  MongoDB.Driver.GridFS (in MongoDB.Driver.GridFS.dll) Version: 2.14.0+2b37a1fe1cbdbe1a020b52b77f1197b6d77575e7
Syntax
public class GridFSBucket : GridFSBucket<ObjectId>, 
	IGridFSBucket, IGridFSBucket<ObjectId>

The GridFSBucket type exposes the following members.

Constructors
  NameDescription
Public methodGridFSBucket
Initializes a new instance of the GridFSBucket class.
Top
Properties
Methods
  NameDescription
Public methodDelete(BsonValue, CancellationToken)
Deletes a file from GridFS.
Public methodDelete(TFileId, CancellationToken)
Deletes a file from GridFS.
(Inherited from GridFSBucket<TFileId>.)
Public methodDeleteAsync(BsonValue, CancellationToken)
Deletes a file from GridFS.
Public methodDeleteAsync(TFileId, CancellationToken)
Deletes a file from GridFS.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadAsBytes(BsonValue, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
Public methodDownloadAsBytes(TFileId, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadAsBytesAsync(BsonValue, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
Public methodDownloadAsBytesAsync(TFileId, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and returns it as a byte array.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadAsBytesByName
Downloads a file stored in GridFS and returns it as a byte array.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadAsBytesByNameAsync
Downloads a file stored in GridFS and returns it as a byte array.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadToStream(BsonValue, Stream, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
Public methodDownloadToStream(TFileId, Stream, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadToStreamAsync(BsonValue, Stream, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
Public methodDownloadToStreamAsync(TFileId, Stream, GridFSDownloadOptions, CancellationToken)
Downloads a file stored in GridFS and writes the contents to a stream.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadToStreamByName
Downloads a file stored in GridFS and writes the contents to a stream.
(Inherited from GridFSBucket<TFileId>.)
Public methodDownloadToStreamByNameAsync
Downloads a file stored in GridFS and writes the contents to a stream.
(Inherited from GridFSBucket<TFileId>.)
Public methodDrop
Drops the files and chunks collections associated with this GridFS bucket.
(Inherited from GridFSBucket<TFileId>.)
Public methodDropAsync
Drops the files and chunks collections associated with this GridFS bucket.
(Inherited from GridFSBucket<TFileId>.)
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 methodFind(FilterDefinition<GridFSFileInfo>, GridFSFindOptions, CancellationToken)
Finds matching entries from the files collection.
Public methodFind(FilterDefinition<GridFSFileInfo<TFileId>>, GridFSFindOptions<TFileId>, CancellationToken)
Finds matching entries from the files collection.
(Inherited from GridFSBucket<TFileId>.)
Public methodFindAsync(FilterDefinition<GridFSFileInfo>, GridFSFindOptions, CancellationToken)
Finds matching entries from the files collection.
Public methodFindAsync(FilterDefinition<GridFSFileInfo<TFileId>>, GridFSFindOptions<TFileId>, CancellationToken)
Finds matching entries from the files collection.
(Inherited from GridFSBucket<TFileId>.)
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 methodOpenDownloadStream(BsonValue, GridFSDownloadOptions, CancellationToken)
Opens a Stream that can be used by the application to read data from a GridFS file.
Public methodOpenDownloadStream(TFileId, GridFSDownloadOptions, CancellationToken)
Opens a Stream that can be used by the application to read data from a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodOpenDownloadStreamAsync(BsonValue, GridFSDownloadOptions, CancellationToken)
Opens a Stream that can be used by the application to read data from a GridFS file.
Public methodOpenDownloadStreamAsync(TFileId, GridFSDownloadOptions, CancellationToken)
Opens a Stream that can be used by the application to read data from a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodOpenDownloadStreamByName
Opens a Stream that can be used by the application to read data from a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodOpenDownloadStreamByNameAsync
Opens a Stream that can be used by the application to read data from a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodOpenUploadStream(String, GridFSUploadOptions, CancellationToken)
Opens a Stream that can be used by the application to write data to a GridFS file.
Public methodOpenUploadStream(TFileId, String, GridFSUploadOptions, CancellationToken)
Opens a Stream that can be used by the application to write data to a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodOpenUploadStreamAsync(String, GridFSUploadOptions, CancellationToken)
Opens a Stream that can be used by the application to write data to a GridFS file.
Public methodOpenUploadStreamAsync(TFileId, String, GridFSUploadOptions, CancellationToken)
Opens a Stream that can be used by the application to write data to a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodRename(BsonValue, String, CancellationToken)
Renames a GridFS file.
Public methodRename(TFileId, String, CancellationToken)
Renames a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodRenameAsync(BsonValue, String, CancellationToken)
Renames a GridFS file.
Public methodRenameAsync(TFileId, String, CancellationToken)
Renames a GridFS file.
(Inherited from GridFSBucket<TFileId>.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUploadFromBytes(String,Byte[], GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
Public methodUploadFromBytes(TFileId, String,Byte[], GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
(Inherited from GridFSBucket<TFileId>.)
Public methodUploadFromBytesAsync(String,Byte[], GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
Public methodUploadFromBytesAsync(TFileId, String,Byte[], GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
(Inherited from GridFSBucket<TFileId>.)
Public methodUploadFromStream(String, Stream, GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
Public methodUploadFromStream(TFileId, String, Stream, GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
(Inherited from GridFSBucket<TFileId>.)
Public methodUploadFromStreamAsync(String, Stream, GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
Public methodUploadFromStreamAsync(TFileId, String, Stream, GridFSUploadOptions, CancellationToken)
Uploads a file (or a new revision of a file) to GridFS.
(Inherited from GridFSBucket<TFileId>.)
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
See Also