MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / readText

Function readText

src/resolution/ruby-parameter-flow.ts:445–453  ·  view source on GitHub ↗
(file: string)

Source from the content-addressed store, hash-verified

443
444 /** A file's text; nothing for one extraction wouldn't take, or that can't be read. */
445 const readText = (file: string): string => {
446 try {
447 const text = readSourceText(path.join(root, file)) ?? '';
448 // It can have grown since the check.
449 return text.length > MAX_SOURCE_FILE_SIZE_BYTES ? '' : text;
450 } catch {
451 return '';
452 }
453 };
454 /** Each file is read once in a pass, whoever asks: on Windows an open costs more than what follows it. */
455 const textOf = (file: string): string => {
456 let text = texts.get(file);

Callers 2

textOfFunction · 0.70
writtenFunction · 0.70

Calls 2

readSourceTextFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected