(files: string[])
| 15 | } |
| 16 | |
| 17 | async parse(files: string[]): Promise<Collection<Stream>> { |
| 18 | const parsed = new Collection<Stream>() |
| 19 | |
| 20 | for (const filepath of files) { |
| 21 | if (!this.storage.existsSync(filepath)) continue |
| 22 | const _parsed: Collection<Stream> = await this.parseFile(filepath) |
| 23 | _parsed.forEach((item: Stream) => { |
| 24 | parsed.add(item) |
| 25 | }) |
| 26 | } |
| 27 | |
| 28 | return parsed |
| 29 | } |
| 30 | |
| 31 | async parseFile(filepath: string): Promise<Collection<Stream>> { |
| 32 | const content = await this.storage.load(filepath) |