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

Function genContentTree

src/back/rust.ts:6–24  ·  view source on GitHub ↗
(folder: string)

Source from the content-addressed store, hash-verified

4import { genContentTree as gct, copyFolder as cf } from '@fparchive/flashpoint-archive';
5
6export async function genContentTree(folder: string): Promise<ContentTree> {
7 try {
8 const tree = await gct(folder);
9 return {
10 root: tree,
11 };
12 } catch (error) {
13 log.error('Curate', `Error generating content tree: ${error}`);
14 return {
15 root: {
16 name: '',
17 expanded: true,
18 nodeType: 'directory',
19 children: [],
20 count: 0
21 }
22 };
23 }
24}
25
26export async function copyFolder(src: string, dest: string): Promise<void> {
27 const rootFiles = await fs.promises.readdir(src);

Callers 6

loadCurationArchiveFunction · 0.90
registerRequestCallbacksFunction · 0.90
createApiFactoryFunction · 0.90
loadCurationFolderFunction · 0.90
makeCurationFromGameFunction · 0.90
refreshCurationContentFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected