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

Function realPath

test/fixtures/snapshot/typescript.js:43425–43435  ·  view source on GitHub ↗
(path, host, traceEnabled)

Source from the content-addressed store, hash-verified

43423 return { path: path, parts: parts };
43424 }
43425 function realPath(path, host, traceEnabled) {
43426 if (!host.realpath) {
43427 return path;
43428 }
43429 var real = ts.normalizePath(host.realpath(path));
43430 if (traceEnabled) {
43431 trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
43432 }
43433 ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
43434 return real;
43435 }
43436 function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
43437 if (state.traceEnabled) {
43438 trace(state.host, ts.Diagnostics.Loading_module_as_file_Slash_folder_candidate_module_location_0_target_file_type_1, candidate, Extensions[extensions]);

Callers 2

tryResolveFunction · 0.85

Calls 4

traceFunction · 0.85
assertMethod · 0.80
concatMethod · 0.80
realpathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…