GridFSFileInfo class

The GridFSFileInfo is a strongly typed class that represents the information about a GridFS file stored in the “fs.files” collection.

This class is a strongly typed wrapper around a backing BsonDocument. It makes it easier to extract the information available in a files collection documents.

In older drivers it was possible to store arbitrary information at the root level of a files collection document. If you need to access that information you can use the BackingDocument property to get access to the complete backing document. When uploading new GridFS files you should store any additional information you want to associate with the uploaded file inside the Metadata document.