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

Method readText

packages/kaos/src/ssh.ts:715–723  ·  view source on GitHub ↗
(
    path: string,
    options?: { encoding?: BufferEncoding; errors?: 'strict' | 'replace' | 'ignore' },
  )

Source from the content-addressed store, hash-verified

713 }
714
715 async readText(
716 path: string,
717 options?: { encoding?: BufferEncoding; errors?: 'strict' | 'replace' | 'ignore' },
718 ): Promise<string> {
719 const encoding = options?.encoding ?? 'utf-8';
720 const errors = options?.errors ?? 'strict';
721 const data = await sftpReadFile(this._sftp, this._resolvePath(path));
722 return decodeTextWithErrors(data, encoding, errors);
723 }
724
725 async *readLines(
726 path: string,

Callers 1

readLinesMethod · 0.95

Calls 3

_resolvePathMethod · 0.95
decodeTextWithErrorsFunction · 0.90
sftpReadFileFunction · 0.85

Tested by

no test coverage detected