Table of Contents

Method FindAsync

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

FindAsync(FilterDefinition<GridFSFileInfo>, GridFSFindOptions, CancellationToken)

Finds matching entries from the files collection.

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

Parameters

filter FilterDefinition<GridFSFileInfo>

The filter.

options GridFSFindOptions

The options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IAsyncCursor<GridFSFileInfo>>

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