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

Function handleFilePaths

lib/fs.js:1745–1756  ·  view source on GitHub ↗
({ result, currentPath, context })

Source from the content-addressed store, hash-verified

1743}
1744
1745function handleFilePaths({ result, currentPath, context }) {
1746 for (let i = 0; i < result.length; i++) {
1747 const resultPath = pathModule.join(currentPath, result[i]);
1748 const relativeResultPath = pathModule.relative(context.basePath, resultPath);
1749 const stat = binding.internalModuleStat(resultPath);
1750 ArrayPrototypePush(context.readdirResults, relativeResultPath);
1751
1752 if (stat === 1) {
1753 ArrayPrototypePush(context.pathsQueue, resultPath);
1754 }
1755 }
1756}
1757
1758/**
1759 * An iterative algorithm for reading the entire contents of the `basePath` directory.

Callers 1

processReaddirResultFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…