C# 클래스 MongoDB.Driver.GridFS.MongoGridFS

Represents a GridFS file system.
파일 보기 프로젝트 열기: Qiredev/mongo-csharp-driver 1 사용 예제들

공개 메소드들

메소드 설명
AppendText ( string remoteFileName ) : StreamWriter

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

CopyTo ( string sourceFileName, string destFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Copies a GridFS file.

CopyTo ( string sourceFileName, string destFileName, MongoGridFSCreateOptions createOptions ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Copies a GridFS file.

Create ( string remoteFileName ) : MongoGridFSStream

Creates or overwrites a GridFS file.

Create ( string remoteFileName, MongoGridFSCreateOptions createOptions ) : MongoGridFSStream

Creates or overwrites a GridFS file.

CreateText ( string remoteFileName ) : StreamWriter

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

CreateText ( string remoteFileName, MongoGridFSCreateOptions createOptions ) : StreamWriter

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

Delete ( IMongoQuery query ) : void

Deletes GridFS files.

Delete ( string remoteFileName ) : void

Deletes all versions of a GridFS file.

DeleteById ( BsonValue id ) : void

Deletes a GridFS file.

Download ( Stream stream, IMongoQuery query ) : void

Downloads the most recent version of a GridFS file.

Download ( Stream stream, IMongoQuery query, int version ) : void

Downloads a specific version of a GridFS file.

Download ( Stream stream, MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo ) : void

Downloads a GridFS file.

Download ( Stream stream, string remoteFileName ) : void

Downloads the most recent version of a GridFS file.

Download ( Stream stream, string remoteFileName, int version ) : void

Downloads a specific version of a GridFS file.

Download ( string fileName ) : void

Downloads the most recent version of a GridFS file.

Download ( string localFileName, IMongoQuery query ) : void

Downloads the most recent version of a GridFS file.

Download ( string localFileName, IMongoQuery query, int version ) : void

Downloads a specific version of a GridFS file.

Download ( string localFileName, MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo ) : void

Downloads a GridFS file.

Download ( string fileName, int version ) : void

Downloads a specific version of a GridFS file.

Download ( string localFileName, string remoteFileName ) : void

Downloads the most recent version of a GridFS file.

Download ( string localFileName, string remoteFileName, int version ) : void

Downloads a specific version of a GridFS file.

EnsureIndexes ( ) : void

Ensures that the proper indexes for GridFS exist (only creates the new indexes if there are fewer than 1000 GridFS files).

EnsureIndexes ( int maxFiles ) : void

Ensures that the proper indexes for GridFS exist.

Exists ( IMongoQuery query ) : bool

Tests whether a GridFS file exists.

Exists ( string remoteFileName ) : bool

Tests whether a GridFS file exists.

ExistsById ( BsonValue id ) : bool

Tests whether a GridFS file exists.

Find ( IMongoQuery query ) : MongoCursor

Finds matching GridFS files.

Find ( string remoteFileName ) : MongoCursor

Finds matching GridFS files.

FindAll ( ) : MongoCursor

Finds all GridFS files.

FindOne ( IMongoQuery query ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Finds the most recent version of a GridFS file.

FindOne ( IMongoQuery query, int version ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Finds a specific version of a GridFS file.

FindOne ( string remoteFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Finds the most recent version of a GridFS file.

FindOne ( string remoteFileName, int version ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Finds a specific version of a GridFS file.

FindOneById ( BsonValue id ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Finds a GridFS file.

MongoGridFS ( MongoDatabase database ) : System

Initializes a new instance of the MongoGridFS class.

MongoGridFS ( MongoDatabase database, MongoDB.Driver.GridFS.MongoGridFSSettings settings ) : System

Initializes a new instance of the MongoGridFS class.

MoveTo ( string sourceFileName, string destFileName ) : void

Moves the most recent version of a GridFS file.

Open ( string remoteFileName, FileMode mode ) : MongoGridFSStream

Opens a GridFS file with the specified mode.

Open ( string remoteFileName, FileMode mode, FileAccess access ) : MongoGridFSStream

Opens a GridFS file with the specified mode and access.

Open ( string remoteFileName, FileMode mode, FileAccess access, MongoGridFSCreateOptions createOptions ) : MongoGridFSStream

Opens a GridFS file with the specified mode, access and create options.

OpenRead ( string remoteFileName ) : MongoGridFSStream

Opens an existing GridFS file for reading.

OpenText ( string remoteFileName ) : StreamReader

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

OpenWrite ( string remoteFileName ) : MongoGridFSStream

Opens an existing GridFS file for writing.

OpenWrite ( string remoteFileName, MongoGridFSCreateOptions createOptions ) : MongoGridFSStream

Opens an existing GridFS file for writing.

SetAliases ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, string aliases ) : void

Sets the aliases for an existing GridFS file.

SetContentType ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, string contentType ) : void

Sets the content type for an existing GridFS file.

SetMetadata ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, BsonValue metadata ) : void

Sets the metadata for an existing GridFS file.

Upload ( Stream stream, string remoteFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Uploads a GridFS file.

Upload ( Stream stream, string remoteFileName, MongoGridFSCreateOptions createOptions ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Uploads a GridFS file.

Upload ( string fileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Uploads a GridFS file.

Upload ( string localFileName, string remoteFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo

Uploads a GridFS file.

메소드 상세

AppendText() 공개 메소드

Appends UTF-8 encoded text to an existing GridFS file.
public AppendText ( string remoteFileName ) : StreamWriter
remoteFileName string The remote file name.
리턴 System.IO.StreamWriter

CopyTo() 공개 메소드

Copies a GridFS file.
public CopyTo ( string sourceFileName, string destFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
sourceFileName string The source file name.
destFileName string The destination file name.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

CopyTo() 공개 메소드

Copies a GridFS file.
public CopyTo ( string sourceFileName, string destFileName, MongoGridFSCreateOptions createOptions ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
sourceFileName string The source file name.
destFileName string The destination file name.
createOptions MongoGridFSCreateOptions The create options.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

Create() 공개 메소드

Creates or overwrites a GridFS file.
public Create ( string remoteFileName ) : MongoGridFSStream
remoteFileName string The remote file name.
리턴 MongoGridFSStream

Create() 공개 메소드

Creates or overwrites a GridFS file.
public Create ( string remoteFileName, MongoGridFSCreateOptions createOptions ) : MongoGridFSStream
remoteFileName string The remote file name.
createOptions MongoGridFSCreateOptions The create options.
리턴 MongoGridFSStream

CreateText() 공개 메소드

Creates or opens a GridFS file for writing UTF-8 encoded text.
public CreateText ( string remoteFileName ) : StreamWriter
remoteFileName string The remote file name.
리턴 System.IO.StreamWriter

CreateText() 공개 메소드

Creates or opens a GridFS file for writing UTF-8 encoded text.
public CreateText ( string remoteFileName, MongoGridFSCreateOptions createOptions ) : StreamWriter
remoteFileName string The remote file name.
createOptions MongoGridFSCreateOptions The create options.
리턴 System.IO.StreamWriter

Delete() 공개 메소드

Deletes GridFS files.
public Delete ( IMongoQuery query ) : void
query IMongoQuery A query that specifies the GridFS files to delete.
리턴 void

Delete() 공개 메소드

Deletes all versions of a GridFS file.
public Delete ( string remoteFileName ) : void
remoteFileName string The remote file name.
리턴 void

DeleteById() 공개 메소드

Deletes a GridFS file.
public DeleteById ( BsonValue id ) : void
id BsonValue The GridFS file Id.
리턴 void

Download() 공개 메소드

Downloads the most recent version of a GridFS file.
public Download ( Stream stream, IMongoQuery query ) : void
stream Stream The destination stream.
query IMongoQuery The GridFS file.
리턴 void

Download() 공개 메소드

Downloads a specific version of a GridFS file.
public Download ( Stream stream, IMongoQuery query, int version ) : void
stream Stream The destination stream.
query IMongoQuery The GridFS file.
version int The version to download.
리턴 void

Download() 공개 메소드

Downloads a GridFS file.
public Download ( Stream stream, MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo ) : void
stream Stream The destination stream.
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file.
리턴 void

Download() 공개 메소드

Downloads the most recent version of a GridFS file.
public Download ( Stream stream, string remoteFileName ) : void
stream Stream The destination stream.
remoteFileName string The remote file name.
리턴 void

Download() 공개 메소드

Downloads a specific version of a GridFS file.
public Download ( Stream stream, string remoteFileName, int version ) : void
stream Stream The destination stream.
remoteFileName string The remote file name.
version int The version to download.
리턴 void

Download() 공개 메소드

Downloads the most recent version of a GridFS file.
public Download ( string fileName ) : void
fileName string The file name (same local and remote names).
리턴 void

Download() 공개 메소드

Downloads the most recent version of a GridFS file.
public Download ( string localFileName, IMongoQuery query ) : void
localFileName string The local file name.
query IMongoQuery The GridFS file.
리턴 void

Download() 공개 메소드

Downloads a specific version of a GridFS file.
public Download ( string localFileName, IMongoQuery query, int version ) : void
localFileName string The local file name.
query IMongoQuery The GridFS file.
version int The version to download.
리턴 void

Download() 공개 메소드

Downloads a GridFS file.
public Download ( string localFileName, MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo ) : void
localFileName string The local file name.
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file.
리턴 void

Download() 공개 메소드

Downloads a specific version of a GridFS file.
public Download ( string fileName, int version ) : void
fileName string The file name (same local and remote names).
version int The version to download.
리턴 void

Download() 공개 메소드

Downloads the most recent version of a GridFS file.
public Download ( string localFileName, string remoteFileName ) : void
localFileName string The local file name.
remoteFileName string The remote file name.
리턴 void

Download() 공개 메소드

Downloads a specific version of a GridFS file.
public Download ( string localFileName, string remoteFileName, int version ) : void
localFileName string The local file name.
remoteFileName string The remote file name.
version int The version to download.
리턴 void

EnsureIndexes() 공개 메소드

Ensures that the proper indexes for GridFS exist (only creates the new indexes if there are fewer than 1000 GridFS files).
public EnsureIndexes ( ) : void
리턴 void

EnsureIndexes() 공개 메소드

Ensures that the proper indexes for GridFS exist.
public EnsureIndexes ( int maxFiles ) : void
maxFiles int Only create new indexes if there are fewer than this number of GridFS files).
리턴 void

Exists() 공개 메소드

Tests whether a GridFS file exists.
public Exists ( IMongoQuery query ) : bool
query IMongoQuery The GridFS file.
리턴 bool

Exists() 공개 메소드

Tests whether a GridFS file exists.
public Exists ( string remoteFileName ) : bool
remoteFileName string The GridFS file.
리턴 bool

ExistsById() 공개 메소드

Tests whether a GridFS file exists.
public ExistsById ( BsonValue id ) : bool
id BsonValue The GridFS file.
리턴 bool

Find() 공개 메소드

Finds matching GridFS files.
public Find ( IMongoQuery query ) : MongoCursor
query IMongoQuery A query.
리턴 MongoCursor

Find() 공개 메소드

Finds matching GridFS files.
public Find ( string remoteFileName ) : MongoCursor
remoteFileName string The remote file name.
리턴 MongoCursor

FindAll() 공개 메소드

Finds all GridFS files.
public FindAll ( ) : MongoCursor
리턴 MongoCursor

FindOne() 공개 메소드

Finds the most recent version of a GridFS file.
public FindOne ( IMongoQuery query ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
query IMongoQuery The GridFS file.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

FindOne() 공개 메소드

Finds a specific version of a GridFS file.
public FindOne ( IMongoQuery query, int version ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
query IMongoQuery The GridFS file.
version int The version to find.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

FindOne() 공개 메소드

Finds the most recent version of a GridFS file.
public FindOne ( string remoteFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
remoteFileName string The remote file name.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

FindOne() 공개 메소드

Finds a specific version of a GridFS file.
public FindOne ( string remoteFileName, int version ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
remoteFileName string The remote file name.
version int The version to find.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

FindOneById() 공개 메소드

Finds a GridFS file.
public FindOneById ( BsonValue id ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
id BsonValue The GridFS file Id.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

MongoGridFS() 공개 메소드

Initializes a new instance of the MongoGridFS class.
public MongoGridFS ( MongoDatabase database ) : System
database MongoDatabase The database containing the GridFS collections.
리턴 System

MongoGridFS() 공개 메소드

Initializes a new instance of the MongoGridFS class.
public MongoGridFS ( MongoDatabase database, MongoDB.Driver.GridFS.MongoGridFSSettings settings ) : System
database MongoDatabase The database containing the GridFS collections.
settings MongoDB.Driver.GridFS.MongoGridFSSettings The GridFS settings.
리턴 System

MoveTo() 공개 메소드

Moves the most recent version of a GridFS file.
public MoveTo ( string sourceFileName, string destFileName ) : void
sourceFileName string The source file name.
destFileName string The destination file name.
리턴 void

Open() 공개 메소드

Opens a GridFS file with the specified mode.
public Open ( string remoteFileName, FileMode mode ) : MongoGridFSStream
remoteFileName string The remote file name.
mode FileMode The mode.
리턴 MongoGridFSStream

Open() 공개 메소드

Opens a GridFS file with the specified mode and access.
public Open ( string remoteFileName, FileMode mode, FileAccess access ) : MongoGridFSStream
remoteFileName string The remote file name.
mode FileMode The mode.
access FileAccess The access.
리턴 MongoGridFSStream

Open() 공개 메소드

Opens a GridFS file with the specified mode, access and create options.
public Open ( string remoteFileName, FileMode mode, FileAccess access, MongoGridFSCreateOptions createOptions ) : MongoGridFSStream
remoteFileName string The remote file name.
mode FileMode The mode.
access FileAccess The access.
createOptions MongoGridFSCreateOptions The create options.
리턴 MongoGridFSStream

OpenRead() 공개 메소드

Opens an existing GridFS file for reading.
public OpenRead ( string remoteFileName ) : MongoGridFSStream
remoteFileName string The remote file name.
리턴 MongoGridFSStream

OpenText() 공개 메소드

Opens an existing UTF-8 encoded text GridFS file for reading.
public OpenText ( string remoteFileName ) : StreamReader
remoteFileName string The remote file name.
리턴 System.IO.StreamReader

OpenWrite() 공개 메소드

Opens an existing GridFS file for writing.
public OpenWrite ( string remoteFileName ) : MongoGridFSStream
remoteFileName string The remote file name.
리턴 MongoGridFSStream

OpenWrite() 공개 메소드

Opens an existing GridFS file for writing.
public OpenWrite ( string remoteFileName, MongoGridFSCreateOptions createOptions ) : MongoGridFSStream
remoteFileName string The remote file name.
createOptions MongoGridFSCreateOptions The create options.
리턴 MongoGridFSStream

SetAliases() 공개 메소드

Sets the aliases for an existing GridFS file.
public SetAliases ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, string aliases ) : void
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file.
aliases string The aliases.
리턴 void

SetContentType() 공개 메소드

Sets the content type for an existing GridFS file.
public SetContentType ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, string contentType ) : void
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file.
contentType string The content type.
리턴 void

SetMetadata() 공개 메소드

Sets the metadata for an existing GridFS file.
public SetMetadata ( MongoDB.Driver.GridFS.MongoGridFSFileInfo fileInfo, BsonValue metadata ) : void
fileInfo MongoDB.Driver.GridFS.MongoGridFSFileInfo The GridFS file.
metadata BsonValue The metadata.
리턴 void

Upload() 공개 메소드

Uploads a GridFS file.
public Upload ( Stream stream, string remoteFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
stream Stream The source stream.
remoteFileName string The remote file name.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

Upload() 공개 메소드

Uploads a GridFS file.
public Upload ( Stream stream, string remoteFileName, MongoGridFSCreateOptions createOptions ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
stream Stream The source stream.
remoteFileName string The remote file name.
createOptions MongoGridFSCreateOptions The create options.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

Upload() 공개 메소드

Uploads a GridFS file.
public Upload ( string fileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
fileName string The file name (same local and remote names).
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo

Upload() 공개 메소드

Uploads a GridFS file.
public Upload ( string localFileName, string remoteFileName ) : MongoDB.Driver.GridFS.MongoGridFSFileInfo
localFileName string The local file name.
remoteFileName string The remote file name.
리턴 MongoDB.Driver.GridFS.MongoGridFSFileInfo