MCPcopy Index your code
hub / github.com/coderoad/coderoad-vscode / readFile

Function readFile

src/services/node/index.ts:43–49  ·  view source on GitHub ↗
(...paths: string[])

Source from the content-addressed store, hash-verified

41}
42
43export const readFile = (...paths: string[]): Promise<string | void> => {
44 const filePath = getWorkspacePath(...paths)
45 logger(`Reading file: ${filePath}`)
46 return asyncReadFile(getWorkspacePath(...paths), 'utf8').catch((err) => {
47 logger(`Failed to read from ${filePath}: ${err.message}`)
48 })
49}
50
51export const writeFile = (data: any, ...paths: string[]): Promise<void> => {
52 const filePath = getWorkspacePath(...paths)

Callers 1

StorageClass · 0.90

Calls 2

getWorkspacePathFunction · 0.85
loggerFunction · 0.50

Tested by

no test coverage detected