Table of Contents

Class MongoGridFSFileInfo

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

Represents information about a GridFS file (patterned after .NET's FileInfo class).

public class MongoGridFSFileInfo : IEquatable<MongoGridFSFileInfo>
Inheritance
MongoGridFSFileInfo
Implements
Inherited Members
Extension Methods

Constructors

MongoGridFSFileInfo(MongoGridFS, string)

Initializes a new instance of the GridFSFileInfo class.

MongoGridFSFileInfo(MongoGridFS, string, MongoGridFSCreateOptions)

Initializes a new instance of the GridFSFileInfo class.

MongoGridFSFileInfo(MongoGridFS, string, int)

Initializes a new instance of the GridFSFileInfo class.

MongoGridFSFileInfo(MongoServer, MongoServerInstance, string, MongoGridFSSettings, BsonDocument)

Initializes a new instance of the MongoGridFSFileInfo class.

MongoGridFSFileInfo(MongoServer, MongoServerInstance, string, MongoGridFSSettings, string)

Initializes a new instance of the MongoGridFSFileInfo class.

MongoGridFSFileInfo(MongoServer, MongoServerInstance, string, MongoGridFSSettings, string, MongoGridFSCreateOptions)

Initializes a new instance of the MongoGridFSFileInfo class.

Properties

Aliases

Gets the aliases.

ChunkSize

Gets the chunk size.

ContentType

Gets the content type.

DatabaseName

Gets the database name.

Exists

Gets a value indicating whether the GridFS file exists.

GridFS

Gets the GridFS file system that contains this GridFS file.

GridFSSettings

Gets the GridFS settings.

Id

Gets the GridFS file Id.

Length

Gets the file lenth.

MD5

Gets the MD5 hash of the file contents.

Metadata

Gets the metadata.

Name

Gets the remote file name.

Server

Gets the server.

ServerInstance

Gets the server instance;

UploadDate

Gets the upload date.

Methods

AppendText()

Appends UTF-8 encoded text to an existing GridFS file.

CopyTo(string)

Copies a GridFS file.

CopyTo(string, MongoGridFSCreateOptions)

Copies a GridFS file.

Create()

Creates or overwrites a GridFS file.

CreateText()

Creates or opens a GridFS file for writing UTF-8 encoded text.

Delete()

Deletes a GridFS file.

Equals(MongoGridFSFileInfo)

Determines whether this instance and another specified MongoGridFSFileInfo object have the same value.

Equals(MongoGridFSFileInfo, MongoGridFSFileInfo)

Determines whether two specified MongoGridFSFileInfo objects have the same value.

Equals(object)

Determines whether this instance and a specified object, which must also be a MongoGridFSFileInfo object, have the same value.

GetHashCode()

Returns the hash code for this MongoGridFSFileInfo object.

MoveTo(string)

Moves the most recent version of a GridFS file.

Open(FileMode)

Opens a GridFS file with the specified mode.

Open(FileMode, FileAccess)

Opens a GridFS file with the specified mode and access.

OpenRead()

Opens an existing GridFS file for reading.

OpenText()

Opens an existing UTF-8 encoded text GridFS file for reading.

OpenWrite()

Opens an existing GridFS file for writing.

Refresh()

Refreshes the GridFS file info from the server.

Operators

operator ==(MongoGridFSFileInfo, MongoGridFSFileInfo)

Determines whether two specified MongoGridFSFileInfo objects have the same value.

operator !=(MongoGridFSFileInfo, MongoGridFSFileInfo)

Determines whether two specified MongoGridFSFileInfo objects have different values.