MCPcopy Index your code
hub / github.com/upstash/context7 / readStateFilePath

Function readStateFilePath

packages/cli/src/utils/update-check.ts:58–63  ·  view source on GitHub ↗
(stateFile?: string)

Source from the content-addressed store, hash-verified

56
57// Reads resolve to the legacy `~/.context7` file if migration could not move it.
58async function readStateFilePath(stateFile?: string): Promise<string> {
59 if (stateFile) {
60 return stateFile;
61 }
62 return resolveReadPath(UPDATE_STATE_FILE_NAME, getUpdateStateFilePath());
63}
64
65// Writes always target the XDG path; migrate the legacy file first if present.
66async function writeStateFilePath(stateFile?: string): Promise<string> {

Callers 1

readUpdateStateFunction · 0.85

Calls 2

resolveReadPathFunction · 0.85
getUpdateStateFilePathFunction · 0.85

Tested by

no test coverage detected