MCPcopy Create free account
hub / github.com/nodejs/node / appendFile

Method appendFile

lib/internal/vfs/file_handle.js:313–318  ·  view source on GitHub ↗

* Appends data to the file. * @param {Buffer|string} data The data to append * @param {object} [options] Options * @returns {Promise }

(data, options)

Source from the content-addressed store, hash-verified

311 * @returns {Promise<void>}
312 */
313 async appendFile(data, options) {
314 this.#checkClosed('appendFile');
315 const buffer = typeof data === 'string' ?
316 Buffer.from(data, options?.encoding) : data;
317 await this.write(buffer, 0, buffer.length, null);
318 }
319
320 readableWebStream() {
321 throw new ERR_METHOD_NOT_IMPLEMENTED('readableWebStream');

Callers

nothing calls this directly

Calls 3

#checkClosedMethod · 0.95
writeMethod · 0.95
fromMethod · 0.45

Tested by

no test coverage detected