C# 클래스 MongoDB.GridFS.GridFileInfo

Provides instance methods for the creation, copying, deletion, moving, and opening of files, and aids in the creation of GridFileStream objects. The api is very similar to the FileInfo class in System.IO.
파일 보기 프로젝트 열기: sdether/mongodb-csharp 1 사용 예제들

공개 메소드들

메소드 설명
CalcMD5 ( ) : string
Create ( ) : GridFileStream

Creates the file named FileName and returns the GridFileStream

Create ( FileMode mode ) : GridFileStream
Create ( FileMode mode, FileAccess access ) : GridFileStream
Delete ( ) : void

Permanently removes a file from the database.

GridFileInfo ( Database db, string filename ) : System
GridFileInfo ( Database db, string bucket, string filename ) : System
MoveTo ( String newFileName ) : void

Renames a file.

Open ( FileMode mode, FileAccess access ) : GridFileStream
OpenRead ( ) : GridFileStream

Creates a read-only GridFileStream to an existing file.

OpenWrite ( ) : GridFileStream

Creates a write-only GridFileStream to an existing file.

Refresh ( ) : void

Reloads the file information from the database.

The data in the database will not reflect any changes done through an open stream until it is closed.

ToDocument ( ) : Document
ToString ( ) : string
Truncate ( ) : void

Deletes all data in a file and sets the length to 0.

UpdateInfo ( ) : void

Updates the aliases, contentType, metadata and uploadDate in the database.

To rename a file use the MoveTo method.

비공개 메소드들

메소드 설명
LoadFileData ( ) : void
SetFileDataDefaults ( string filename ) : void

메소드 상세

CalcMD5() 공개 메소드

public CalcMD5 ( ) : string
리턴 string

Create() 공개 메소드

Creates the file named FileName and returns the GridFileStream
If the file already exists
public Create ( ) : GridFileStream
리턴 GridFileStream

Create() 공개 메소드

public Create ( FileMode mode ) : GridFileStream
mode FileMode
리턴 GridFileStream

Create() 공개 메소드

public Create ( FileMode mode, FileAccess access ) : GridFileStream
mode FileMode
access FileAccess
리턴 GridFileStream

Delete() 공개 메소드

Permanently removes a file from the database.
public Delete ( ) : void
리턴 void

GridFileInfo() 공개 메소드

public GridFileInfo ( Database db, string filename ) : System
db MongoDB.Driver.Database
filename string
리턴 System

GridFileInfo() 공개 메소드

public GridFileInfo ( Database db, string bucket, string filename ) : System
db MongoDB.Driver.Database
bucket string
filename string
리턴 System

MoveTo() 공개 메소드

Renames a file.
public MoveTo ( String newFileName ) : void
newFileName String
리턴 void

Open() 공개 메소드

public Open ( FileMode mode, FileAccess access ) : GridFileStream
mode FileMode
access FileAccess
리턴 GridFileStream

OpenRead() 공개 메소드

Creates a read-only GridFileStream to an existing file.
public OpenRead ( ) : GridFileStream
리턴 GridFileStream

OpenWrite() 공개 메소드

Creates a write-only GridFileStream to an existing file.
public OpenWrite ( ) : GridFileStream
리턴 GridFileStream

Refresh() 공개 메소드

Reloads the file information from the database.
The data in the database will not reflect any changes done through an open stream until it is closed.
public Refresh ( ) : void
리턴 void

ToDocument() 공개 메소드

public ToDocument ( ) : Document
리턴 MongoDB.Driver.Document

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

Truncate() 공개 메소드

Deletes all data in a file and sets the length to 0.
public Truncate ( ) : void
리턴 void

UpdateInfo() 공개 메소드

Updates the aliases, contentType, metadata and uploadDate in the database.
To rename a file use the MoveTo method.
public UpdateInfo ( ) : void
리턴 void