(levels: Map<string, TreeLevel>, path: string, kind: 'file' | 'dir')
| 909 | } |
| 910 | |
| 911 | function graftPath(levels: Map<string, TreeLevel>, path: string, kind: 'file' | 'dir'): void { |
| 912 | const parent = parentPath(path); |
| 913 | if (parent.length > 0) { |
| 914 | graftPath(levels, parent, 'dir'); |
| 915 | } |
| 916 | const level = ensureLevel(levels, parent); |
| 917 | if (level.children.some((child) => child.path === path)) { |
| 918 | return; |
| 919 | } |
| 920 | level.children.push({ |
| 921 | name: path.slice(path.lastIndexOf('/') + 1), |
| 922 | path, |
| 923 | kind, |
| 924 | symbols: 0, |
| 925 | files: 0, |
| 926 | }); |
| 927 | } |
| 928 | |
| 929 | /** |
| 930 | * Die Vereinigung: die Ebenen aus dem Graphen, ergaenzt um jeden Pfad, den nur |
no test coverage detected