Method FindOne
FindOne(IMongoQuery)
Finds the most recent version of a GridFS file.
public MongoGridFSFileInfo FindOne(IMongoQuery query)
Parameters
query
IMongoQueryThe GridFS file.
Returns
- MongoGridFSFileInfo
The matching GridFS file.
FindOne(IMongoQuery, int)
Finds a specific version of a GridFS file.
public MongoGridFSFileInfo FindOne(IMongoQuery query, int version)
Parameters
query
IMongoQueryThe GridFS file.
version
intThe version to find (1 is oldest, -1 is newest, 0 is no sort).
Returns
- MongoGridFSFileInfo
The matching GridFS file.
FindOne(string)
Finds the most recent version of a GridFS file.
public MongoGridFSFileInfo FindOne(string remoteFileName)
Parameters
remoteFileName
stringThe remote file name.
Returns
- MongoGridFSFileInfo
The matching GridFS file.
FindOne(string, int)
Finds a specific version of a GridFS file.
public MongoGridFSFileInfo FindOne(string remoteFileName, int version)
Parameters
Returns
- MongoGridFSFileInfo
The matching GridFS file.