Table of Contents

Class GridFSBucket

Namespace
MongoDB.Driver.GridFS
Assembly
MongoDB.Driver.GridFS.dll

Represents a GridFS bucket.

public class GridFSBucket : GridFSBucket<ObjectId>, IGridFSBucket, IGridFSBucket<ObjectId>
Inheritance
GridFSBucket
Implements
Inherited Members

Constructors

GridFSBucket(IMongoDatabase, GridFSBucketOptions)

Initializes a new instance of the GridFSBucket class.

Methods

Delete(BsonValue, CancellationToken)

Deletes a file from GridFS.

DeleteAsync(BsonValue, CancellationToken)

Deletes a file from GridFS.

DownloadAsBytes(BsonValue, GridFSDownloadOptions, CancellationToken)

Downloads a file stored in GridFS and returns it as a byte array.

DownloadAsBytesAsync(BsonValue, GridFSDownloadOptions, CancellationToken)

Downloads a file stored in GridFS and returns it as a byte array.

DownloadToStream(BsonValue, Stream, GridFSDownloadOptions, CancellationToken)

Downloads a file stored in GridFS and writes the contents to a stream.

DownloadToStreamAsync(BsonValue, Stream, GridFSDownloadOptions, CancellationToken)

Downloads a file stored in GridFS and writes the contents to a stream.

Find(FilterDefinition<GridFSFileInfo>, GridFSFindOptions, CancellationToken)

Finds matching entries from the files collection.

FindAsync(FilterDefinition<GridFSFileInfo>, GridFSFindOptions, CancellationToken)

Finds matching entries from the files collection.

OpenDownloadStream(BsonValue, GridFSDownloadOptions, CancellationToken)

Opens a Stream that can be used by the application to read data from a GridFS file.

OpenDownloadStreamAsync(BsonValue, GridFSDownloadOptions, CancellationToken)

Opens a Stream that can be used by the application to read data from a GridFS file.

OpenUploadStream(string, GridFSUploadOptions, CancellationToken)

Opens a Stream that can be used by the application to write data to a GridFS file.

OpenUploadStreamAsync(string, GridFSUploadOptions, CancellationToken)

Opens a Stream that can be used by the application to write data to a GridFS file.

Rename(BsonValue, string, CancellationToken)

Renames a GridFS file.

RenameAsync(BsonValue, string, CancellationToken)

Renames a GridFS file.

UploadFromBytes(string, byte[], GridFSUploadOptions, CancellationToken)

Uploads a file (or a new revision of a file) to GridFS.

UploadFromBytesAsync(string, byte[], GridFSUploadOptions, CancellationToken)

Uploads a file (or a new revision of a file) to GridFS.

UploadFromStream(string, Stream, GridFSUploadOptions, CancellationToken)

Uploads a file (or a new revision of a file) to GridFS.

UploadFromStreamAsync(string, Stream, GridFSUploadOptions, CancellationToken)

Uploads a file (or a new revision of a file) to GridFS.