// Find returns the files collection documents that match the given filter.
//
// If this download requires a custom read deadline to be set on the bucket, it cannot be done concurrently with other
// read operations operations on this bucket that also require a custom deadline.
Find returns the files collection documents that match the given filter.

If this download requires a custom read deadline to be set on the bucket, it cannot be done concurrently with other
read operations operations on this bucket that also require a custom deadline.
// Find returns the files collection documents that match the given filter . // // If this download requires a custom read deadline to be set on the bucket it cannot be done concurrently with other // read operations operations on this bucket that also require a custom deadline .
func (b *Bucket) Find(filter interface{}, opts ...*options.GridFSFindOptions) (*mongo.Cursor, error) {
	ctx, cancel := deadlineContext(b.readDeadline)
	if cancel != nil {
		defer cancel()
	}
	gfsOpts := options.MergeGridFSFindOptions(opts...)
	find := options.Find()
	if gfsOpts.BatchSize != nil {
		find.SetBatchSize(*gfsOpts.BatchSize)
	}
	if gfsOpts.Limit != nil {
		find.SetLimit(int64(*gfsOpts.Limit))
	}
	if gfsOpts.MaxTime != nil {
		find.SetMaxTime(*gfsOpts.MaxTime)
	}
	if gfsOpts.NoCursorTimeout != nil {
		find.SetNoCursorTimeout(*gfsOpts.NoCursorTimeout)
	}
	if gfsOpts.Skip != nil {
		find.SetSkip(int64(*gfsOpts.Skip))
	}
	if gfsOpts.Sort != nil {
		find.SetSort(gfsOpts.Sort)
	}
	return b.filesColl.Find(ctx, filter, find)
}
func ( b * Bucket ) Find ( filter interface { } , opts ... * options . GridFSFindOptions ) ( * mongo . Cursor , error ) { ctx , cancel := deadlineContext ( b . readDeadline ) if cancel != nil { defer cancel ( ) } gfsOpts := options . MergeGridFSFindOptions ( opts ... ) find := options . Find ( ) if gfsOpts . BatchSize != nil { find . SetBatchSize ( * gfsOpts . BatchSize ) } if gfsOpts . Limit != nil { find . SetLimit ( int64 ( * gfsOpts . Limit ) ) } if gfsOpts . MaxTime != nil { find . SetMaxTime ( * gfsOpts . MaxTime ) } if gfsOpts . NoCursorTimeout != nil { find . SetNoCursorTimeout ( * gfsOpts . NoCursorTimeout ) } if gfsOpts . Skip != nil { find . SetSkip ( int64 ( * gfsOpts . Skip ) ) } if gfsOpts . Sort != nil { find . SetSort ( gfsOpts . Sort ) } return b . filesColl . Find ( ctx , filter , find ) }
Find returns the files collection documents that match the given filter.
Find returns the files collection documents that match the given filter .