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

Function readFile

src/back/ExtConfigFile.ts:7–13  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

5
6export namespace ExtConfigFile {
7 export function readFile(filePath: string): Promise<AppExtConfigData> {
8 return new Promise((resolve, reject) => {
9 readJsonFile(filePath, 'utf8')
10 .then(json => resolve(parse(json)))
11 .catch(reject);
12 });
13 }
14
15 export async function readOrCreateFile(filePath: string): Promise<AppExtConfigData> {
16 let error: Error | undefined;

Callers 1

readOrCreateFileFunction · 0.70

Calls 2

readJsonFileFunction · 0.90
parseFunction · 0.70

Tested by

no test coverage detected