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

Method stat

lib/internal/vfs/file_system.js:682–690  ·  view source on GitHub ↗

* Gets stats for a path asynchronously. * @param {string} filePath The path to stat * @param {object|Function} [options] Options or callback * @param {Function} [callback] Callback (err, stats)

(filePath, options, callback)

Source from the content-addressed store, hash-verified

680 * @param {Function} [callback] Callback (err, stats)
681 */
682 stat(filePath, options, callback) {
683 if (typeof options === 'function') {
684 callback = options;
685 options = undefined;
686 }
687
688 this[kProvider].stat(this.#toProviderPath(filePath), options)
689 .then((stats) => callback(null, stats), (err) => callback(err));
690 }
691
692 /**
693 * Gets stats without following symlinks asynchronously.

Callers 1

fstatMethod · 0.45

Calls 3

#toProviderPathMethod · 0.95
callbackFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected