(pattern?: string)
| 31 | } |
| 32 | |
| 33 | async list(pattern?: string): Promise<URI[]> { |
| 34 | const paths = Array.from(this.files.keys()); |
| 35 | if (!pattern) { |
| 36 | return paths.map(p => URI.parse(p, 'file')); |
| 37 | } |
| 38 | const matched = micromatch(paths, [`**/${pattern}`]); |
| 39 | return matched.map(p => URI.parse(p, 'file')); |
| 40 | } |
| 41 | |
| 42 | async read(uri: URI): Promise<string | null> { |
| 43 | return this.files.get(uri.path) ?? null; |
no test coverage detected