MongoDB.GridFS Initializes a new instance of the class. The db. Initializes a new instance of the class. The db. The bucket. Lists the files. Lists the files. The query. Copies one file to another. The destination file must not exist or an IOException will be thrown. Source file not found. Destination file already exists. A database error occurred executing the copy function. Creates the specified filename. The filename. Creates the specified filename. The filename. The mode. Creates the specified filename. The filename. The mode. The access. Opens the specified filename. The filename. The mode. The access. Opens the read. The filename. Opens the write. The filename. Permanently removes a file from the database. Permanently removes a file from the database. Permanently removes all files from the database that match the query. Gets a value indicating whether the file exists. Gets a value indicating whether the file exists. Moves the specified SRC. The SRC. The dest. Moves the specified id. The id. The dest. Gets the name. The name. Gets the files. The files. Gets the chunks. The chunks. 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. Initializes a new instance of the class. The db. The bucket. The filename. Initializes a new instance of the class. The db. The filename. Creates the file named FileName and returns the GridFileStream If the file already exists Creates the specified mode. The mode. Creates the specified mode. The mode. The access. Creates a read-only GridFileStream to an existing file. Creates a write-only GridFileStream to an existing file. Opens the specified mode. The mode. The access. Permanently removes a file from the database. Renames a file. Deletes all data in a file and sets the length to 0. Calcs the M d5. Updates the aliases, contentType, metadata and uploadDate in the database. To rename a file use the MoveTo method. 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. Toes the document. Returns a that represents this instance. A that represents this instance. Gets or sets the id. The id. Gets or sets the name of the file. The name of the file. Gets or sets the type of the content. The type of the content. Writing to the length property will not affect the actual data of the file. Open a GridFileStream and call SetLength instead. Gets or sets the aliases. The aliases. Gets or sets the size of the chunk. The size of the chunk. Gets the metadata. The metadata. Gets or sets the upload date. The upload date. Gets or sets the MD5. The MD5. Gets a value indicating whether the file exists. Stream for reading and writing to a file in GridFS. When using the stream for random io it is possible to produce chunks in the begining and middle of the file that are not full size followed by other chunks that are full size. This only affects the md5 sum that is calculated on the file on close. Because of this do not rely on the md5 sum of a file when doing random io. Writing to the stream sequentially works fine and will produce a consistent md5. Initializes a new instance of the class. The gridfileinfo. The files. The chunks. The access. Reads data from the stream into the specified array. It will fill the array in starting at offset and adding count bytes returning the number of bytes read from the stream. Copies from the source array into the grid file. The array. A The offset within the source array. A The number of bytes from within the source array to copy. Flushes any changes to current chunk to the database. It can be called in client code at any time or it will automatically be called on Close() and when the stream position moves off the bounds of the current chunk. An I/O error occurs. Seek to any location in the stream. Seeking past the end of the file is allowed. Any writes to that location will cause the file to grow to that size. Any holes that may be created from the seek will be zero filled on close. Sets the length of this stream to the given value. A Close the stream and flush any changes to the database. Moves the current position to the new position. If this causes a new chunk to need to be loaded it will take care of flushing the buffer and loading a new chunk. A designating where to go to. Loads a chunk from the chunks collection if it exists. Otherwise it creates a blank chunk Document. Deletes all chunks after the specified position and clears out any extra bytes if the position doesn't fall on a chunk boundry. Makes sure that at least a skelton chunk exists for all numbers. If not the MD5 calculation will fail on a sparse file. Releases the unmanaged resources used by the and optionally releases the managed resources. true to release both managed and unmanaged resources; false to release only unmanaged resources. Gets or sets the grid file info. The grid file info. When overridden in a derived class, gets a value indicating whether the current stream supports reading. true if the stream supports reading; otherwise, false. When overridden in a derived class, gets a value indicating whether the current stream supports writing. true if the stream supports writing; otherwise, false. When overridden in a derived class, gets a value indicating whether the current stream supports seeking. true if the stream supports seeking; otherwise, false. When overridden in a derived class, gets the length in bytes of the stream. A long value representing the length of the stream in bytes. A class derived from Stream does not support seeking. Methods were called after the stream was closed. When overridden in a derived class, gets or sets the position within the current stream. The current position within the stream. An I/O error occurs. The stream does not support seeking. Methods were called after the stream was closed. Initializes a new instance of the class. The message. The filename. The inner. Gets the filename. The filename.