MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / readFileSync

Function readFileSync

src/back/PlaylistFile.ts:23–27  ·  view source on GitHub ↗
(filePath: string, onError?: (error: string) => void)

Source from the content-addressed store, hash-verified

21 }
22
23 export function readFileSync(filePath: string, onError?: (error: string) => void): Playlist {
24 const playlist = parse(readJsonFileSync(filePath), onError);
25 playlist.filePath = filePath;
26 return playlist;
27 }
28
29 export async function readOrCreateFile(filePath: string, onError?: (error: string) => void): Promise<Playlist> {
30 let error: Error | undefined;

Callers 1

readOrCreateFileSyncFunction · 0.70

Calls 2

readJsonFileSyncFunction · 0.90
parseFunction · 0.70

Tested by

no test coverage detected