* A keys-only view (eager values plus empty placeholders for unresolved lazy * paths) for glob/suggestSimilar, which match on keys and never read content.
(includeDeleted: boolean)
| 493 | * paths) for glob/suggestSimilar, which match on keys and never read content. |
| 494 | */ |
| 495 | private keyView(includeDeleted: boolean): Map<string, string> { |
| 496 | const view = new Map<string, string>() |
| 497 | for (const [key, value] of this.files) { |
| 498 | if (includeDeleted || !this.isRecentlyDeleted(key)) view.set(key, value) |
| 499 | } |
| 500 | for (const key of this.lazy.keys()) { |
| 501 | if ((includeDeleted || !this.isRecentlyDeleted(key)) && !view.has(key)) { |
| 502 | view.set(key, '') |
| 503 | } |
| 504 | } |
| 505 | return view |
| 506 | } |
| 507 | |
| 508 | /** |
| 509 | * Materialize workspace data into the VFS. |
no test coverage detected