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

Method readText

packages/kaos/src/kaos.ts:71–71  ·  view source on GitHub ↗

* Read the file at `path` as a string. * * `errors` controls how decode errors are handled — mirrors Python's * `open(..., errors=)` parameter: * - `'strict'` (default): throw on any invalid byte for the encoding * - `'replace'`: substitute each invalid byte with U+FFFD (REPLACEMENT C

(
    path: string,
    options?: { encoding?: BufferEncoding; errors?: 'strict' | 'replace' | 'ignore' },
  )

Source from the content-addressed store, hash-verified

69 * - `'ignore'`: drop invalid bytes silently
70 */
71 readText(
72 path: string,
73 options?: { encoding?: BufferEncoding; errors?: 'strict' | 'replace' | 'ignore' },
74 ): Promise<string>;

Callers 15

getFunction · 0.65
executionMethod · 0.65
probeGitMarkerFunction · 0.65
readAgentFileFunction · 0.65
readMetadataMethod · 0.65
dataMethod · 0.65
readWorkspaceLocalTomlFunction · 0.65
ssh.test.tsFile · 0.65
local.test.tsFile · 0.65

Implementers 3

SSHKaospackages/kaos/src/ssh.ts
LocalKaospackages/kaos/src/local.ts
AcpKaospackages/acp-adapter/src/kaos-acp.ts

Calls

no outgoing calls

Tested by 2

getFunction · 0.52
makeReadingSessionFunction · 0.52