(httpRootDir: string, compilerProps: CompilerProps)
| 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); |
nothing calls this directly
no outgoing calls
no test coverage detected