MCPcopy Create free account
hub / github.com/TanStack/router / getFileText

Function getFileText

scripts/ts-symbol-references.mjs:258–265  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

256}
257
258function getFileText(fileName) {
259 if (fileTextCache.has(fileName)) return fileTextCache.get(fileName)
260 if (!existsSync(fileName)) return undefined
261
262 const text = readFileSync(fileName, 'utf8')
263 fileTextCache.set(fileName, text)
264 return text
265}
266
267function getLineText(fileName, sourceFile, position) {
268 const { line } = sourceFile.getLineAndCharacterOfPosition(position)

Callers 2

getScriptSnapshotFunction · 0.85
getLineTextFunction · 0.85

Calls 3

getMethod · 0.65
setMethod · 0.65
hasMethod · 0.45

Tested by

no test coverage detected