(
path: string,
pattern: string,
options?: { caseSensitive?: boolean },
)
| 617 | } |
| 618 | |
| 619 | async *glob( |
| 620 | path: string, |
| 621 | pattern: string, |
| 622 | options?: { caseSensitive?: boolean }, |
| 623 | ): AsyncGenerator<string> { |
| 624 | const resolved = this._resolvePath(path); |
| 625 | const caseSensitive = options?.caseSensitive ?? true; |
| 626 | if (!caseSensitive) { |
| 627 | throw new KaosValueError('Case insensitive glob is not supported in current environment'); |
| 628 | } |
| 629 | // Use local glob implementation over SFTP readdir |
| 630 | const patternParts = pattern.split('/'); |
| 631 | yield* this._globWalk(resolved, patternParts, caseSensitive); |
| 632 | } |
| 633 | |
| 634 | private async *_globWalk( |
| 635 | basePath: string, |
nothing calls this directly
no test coverage detected