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

Method realpath

lib/internal/vfs/file_system.js:730–739  ·  view source on GitHub ↗

* Gets the real path asynchronously. * @param {string} filePath The path * @param {object|Function} [options] Options or callback * @param {Function} [callback] Callback (err, resolvedPath)

(filePath, options, callback)

Source from the content-addressed store, hash-verified

728 * @param {Function} [callback] Callback (err, resolvedPath)
729 */
730 realpath(filePath, options, callback) {
731 if (typeof options === 'function') {
732 callback = options;
733 options = undefined;
734 }
735
736 this[kProvider].realpath(this.#toProviderPath(filePath), options)
737 .then((realPath) => callback(null, this.#toMountedPath(realPath)),
738 (err) => callback(err));
739 }
740
741 /**
742 * Reads symlink target asynchronously.

Callers

nothing calls this directly

Calls 4

#toProviderPathMethod · 0.95
#toMountedPathMethod · 0.95
callbackFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected