MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

lib/storage/local.ts:44–50  ·  view source on GitHub ↗
(httpRootDir: string, compilerProps: CompilerProps)

Source from the content-addressed store, hash-verified

42 protected readonly storageFolder: string;
43
44 constructor(httpRootDir: string, compilerProps: CompilerProps) {
45 super(httpRootDir, compilerProps);
46 this.storageFolder = path.normalize(compilerProps.ceProps('localStorageFolder', './lib/storage/data/'));
47 // Ensure we have a working storage dir before we have a chance to process anything.
48 fsSync.mkdirSync(this.storageFolder, {recursive: true});
49 logger.info(`Using local storage solution on ${this.storageFolder}`);
50 }
51
52 async storeItem(item: StoredObject) {
53 const filePath = path.join(this.storageFolder, item.uniqueSubHash);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected