Table of Contents

Class GridFSFileInfo<TFileId>

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<TFileId> : BsonDocumentBackedClass

Type Parameters

TFileId

The type of the file identifier.

Inheritance
GridFSFileInfo<TFileId>
Inherited Members

Constructors

GridFSFileInfo(BsonDocument, IGridFSFileInfoSerializer<TFileId>)

Initializes a new instance of the GridFSFileInfo class.

public GridFSFileInfo(BsonDocument backingDocument, IGridFSFileInfoSerializer<TFileId> fileInfoSerializer)

Parameters

backingDocument BsonDocument

The backing document.

fileInfoSerializer IGridFSFileInfoSerializer<TFileId>

The fileInfo serializer.

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 TFileId Id { get; }

Property Value

TFileId

The identifier.

Length

Gets the length.

public long Length { get; }

Property Value

long

The length.

MD5

Gets the MD5 checksum.

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.