MCPcopy
hub / github.com/mongodb/node-mongodb-native / _write

Method _write

src/gridfs/upload.ts:180–186  ·  view source on GitHub ↗

* @internal * Write a buffer to the stream. * * @param chunk - Buffer to write * @param encoding - Optional encoding for the buffer * @param callback - Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush

(
    chunk: Uint8Array | string,
    encoding: BufferEncoding,
    callback: Callback<void>
  )

Source from the content-addressed store, hash-verified

178 * @param callback - Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush.
179 */
180 override _write(
181 chunk: Uint8Array | string,
182 encoding: BufferEncoding,
183 callback: Callback<void>
184 ): void {
185 doWrite(this, chunk, encoding, callback);
186 }
187
188 /** @internal */
189 override _final(callback: (error?: Error | null) => void): void {

Callers

nothing calls this directly

Calls 1

doWriteFunction · 0.85

Tested by

no test coverage detected