Table of Contents

Method FindAsync

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

FindAsync(FilterDefinition<GridFSFileInfo<TFileId>>, GridFSFindOptions<TFileId>, CancellationToken)

Finds matching entries from the files collection.

public Task<IAsyncCursor<GridFSFileInfo<TFileId>>> FindAsync(FilterDefinition<GridFSFileInfo<TFileId>> filter, GridFSFindOptions<TFileId> options = null, CancellationToken cancellationToken = default)

Parameters

filter FilterDefinition<GridFSFileInfo<TFileId>>

The filter.

options GridFSFindOptions<TFileId>

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IAsyncCursor<GridFSFileInfo<TFileId>>>

A Task whose result is a cursor of files collection documents.