({ result, currentPath, context })
| 1726 | const processReaddirResult = (args) => (args.context.withFileTypes ? handleDirents(args) : handleFilePaths(args)); |
| 1727 | |
| 1728 | function handleDirents({ result, currentPath, context }) { |
| 1729 | const { 0: names, 1: types } = result; |
| 1730 | const { length } = names; |
| 1731 | |
| 1732 | for (let i = 0; i < length; i++) { |
| 1733 | // Avoid excluding symlinks, as they are not directories. |
| 1734 | // Refs: https://github.com/nodejs/node/issues/52663 |
| 1735 | const fullPath = pathModule.join(currentPath, names[i]); |
| 1736 | const dirent = getDirent(currentPath, names[i], types[i]); |
| 1737 | ArrayPrototypePush(context.readdirResults, dirent); |
| 1738 | |
| 1739 | if (dirent.isDirectory() || binding.internalModuleStat(fullPath) === 1) { |
| 1740 | ArrayPrototypePush(context.pathsQueue, fullPath); |
| 1741 | } |
| 1742 | } |
| 1743 | } |
| 1744 | |
| 1745 | function handleFilePaths({ result, currentPath, context }) { |
| 1746 | for (let i = 0; i < result.length; i++) { |
no test coverage detected
searching dependent graphs…