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

Method content

lib/internal/vfs/file_handle.js:435–441  ·  view source on GitHub ↗

* Gets the current content synchronously. * For dynamic content providers, this gets fresh content from the entry. * @returns {Buffer}

()

Source from the content-addressed store, hash-verified

433 * @returns {Buffer}
434 */
435 get content() {
436 // If entry has a dynamic content provider, get fresh content sync
437 if (this.#entry?.isDynamic && this.#entry.isDynamic()) {
438 return this.#entry.getContentSync();
439 }
440 return this.#content.subarray(0, this.#size);
441 }
442
443 /**
444 * Gets the current content asynchronously.

Callers

nothing calls this directly

Calls 2

isDynamicMethod · 0.80
getContentSyncMethod · 0.80

Tested by

no test coverage detected