MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / glob

Method glob

packages/kaos/src/ssh.ts:619–632  ·  view source on GitHub ↗
(
    path: string,
    pattern: string,
    options?: { caseSensitive?: boolean },
  )

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 2

_resolvePathMethod · 0.95
_globWalkMethod · 0.95

Tested by

no test coverage detected