(p: string)
| 764 | }; |
| 765 | ingest(root, tree); |
| 766 | const resolve = (p: string): Entry | null => { |
| 767 | const parts = p.split('/').filter((s) => s.length > 0); |
| 768 | let cur: Entry = { kind: 'dir', entries: root }; |
| 769 | for (const part of parts) { |
| 770 | if (cur.kind !== 'dir') return null; |
| 771 | const next = cur.entries.get(part); |
| 772 | if (next === undefined) return null; |
| 773 | cur = next; |
| 774 | } |
| 775 | return cur; |
| 776 | }; |
| 777 | return { |
| 778 | readdir: async (p) => { |
| 779 | const e = resolve(p); |
no outgoing calls
no test coverage detected