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

Function readlinkSync

lib/fs.js:2141–2149  ·  view source on GitHub ↗

* Synchronously reads the contents of a symbolic link * referred to by `path`. * @param {string | Buffer | URL} path * @param {{ encoding?: string; } | string} [options] * @returns {string | Buffer}

(path, options)

Source from the content-addressed store, hash-verified

2139 * @returns {string | Buffer}
2140 */
2141function readlinkSync(path, options) {
2142 const h = vfsState.handlers;
2143 if (h !== null) {
2144 const result = h.readlinkSync(path, options);
2145 if (result !== undefined) return result;
2146 }
2147 options = getOptions(options);
2148 return binding.readlink(getValidatedPath(path), options.encoding);
2149}
2150
2151/**
2152 * Creates the link called `path` pointing to `target`.

Calls 3

getOptionsFunction · 0.50
readlinkSyncMethod · 0.45
readlinkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…