(parentPath: string)
| 167 | } |
| 168 | |
| 169 | function renderEntries(parentPath: string) { |
| 170 | const children = childrenByPath.get(parentPath) ?? []; |
| 171 | for (const entry of children) { |
| 172 | const indent = ' '.repeat(entry.depth); |
| 173 | const label = entry.type === 'tree' ? `${entry.name}/` : entry.name; |
| 174 | outputLines.push(`${indent}${label}`); |
| 175 | if (entry.type === 'tree') { |
| 176 | renderEntries(entry.path); |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | renderEntries(normalizedPath); |
| 182 |