Table of Contents

Class GridFSFileInfo

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

Represents information about a stored GridFS file (backed by a files collection document).

[BsonSerializer(typeof(GridFSFileInfoSerializer))]
public sealed class GridFSFileInfo : BsonDocumentBackedClass
Inheritance
GridFSFileInfo
Inherited Members

Constructors

GridFSFileInfo(BsonDocument)

Initializes a new instance of the GridFSFileInfo class.

public GridFSFileInfo(BsonDocument backingDocument)

Parameters

backingDocument BsonDocument

The backing document.

Properties

Aliases

Gets the aliases.

[Obsolete("Place aliases inside metadata instead.")]
public IEnumerable<string> Aliases { get; }

Property Value

IEnumerable<string>

The aliases.

BackingDocument

Gets the backing document.

public BsonDocument BackingDocument { get; }

Property Value

BsonDocument

The backing document.

ChunkSizeBytes

Gets the size of a chunk.

public int ChunkSizeBytes { get; }

Property Value

int

The size of a chunk.

ContentType

Gets the type of the content.

[Obsolete("Place contentType inside metadata instead.")]
public string ContentType { get; }

Property Value

string

The type of the content.

Filename

Gets the filename.

public string Filename { get; }

Property Value

string

The filename.

Id

Gets the identifier.

public ObjectId Id { get; }

Property Value

ObjectId

The identifier.

IdAsBsonValue

Gets the identifier as a BsonValue.

[Obsolete("All new GridFS files should use an ObjectId as the Id.")]
public BsonValue IdAsBsonValue { get; }

Property Value

BsonValue

The identifier as a BsonValue.

Length

Gets the length.

public long Length { get; }

Property Value

long

The length.

MD5

Gets the MD5 checksum.

[Obsolete("MD5 support will be removed soon.")]
public string MD5 { get; }

Property Value

string

The MD5 checksum.

Metadata

Gets the metadata.

public BsonDocument Metadata { get; }

Property Value

BsonDocument

The metadata.

UploadDateTime

Gets the upload date time.

public DateTime UploadDateTime { get; }

Property Value

DateTime

The upload date time.