MCPcopy Index your code
hub / github.com/nodejs/node / readFileSync

Method readFileSync

lib/internal/vfs/file_system.js:260–263  ·  view source on GitHub ↗

* Reads a file synchronously. * @param {string} filePath The path to read * @param {object|string} [options] Options or encoding * @returns {Buffer|string}

(filePath, options)

Source from the content-addressed store, hash-verified

258 * @returns {Buffer|string}
259 */
260 readFileSync(filePath, options) {
261 const providerPath = this.#toProviderPath(filePath);
262 return this[kProvider].readFileSync(providerPath, options);
263 }
264
265 /**
266 * Writes a file synchronously.

Callers 1

openAsBlobMethod · 0.45

Calls 1

#toProviderPathMethod · 0.95

Tested by

no test coverage detected