(collectKey, thisFile)
| 1079 | } |
| 1080 | |
| 1081 | async #addMod(collectKey, thisFile) { |
| 1082 | const thisFileStats = this.#fileStats(collectKey, thisFile) |
| 1083 | |
| 1084 | // Check cache |
| 1085 | const modInCache = this.#cacheHit(thisFileStats) |
| 1086 | if ( modInCache ) { |
| 1087 | // this.#log.debug(`mod-${modInCache.uuid}`, 'Adding mod FROM cache', modInCache.fileDetail.shortName) |
| 1088 | this.#addModToData(collectKey, modInCache) |
| 1089 | return |
| 1090 | } |
| 1091 | |
| 1092 | this.#threadPool[this.#getCurrentThread()].send({ |
| 1093 | type : 'mod', |
| 1094 | data : { |
| 1095 | collectKey : collectKey, |
| 1096 | date : (this.#useSyncSafeMode) ? thisFileStats.birthDate.toISOString() : thisFileStats.date.toISOString(), |
| 1097 | filePath : thisFileStats.fullPath, |
| 1098 | isFolder : thisFileStats.isFolder, |
| 1099 | md5Pre : thisFileStats.hashString, |
| 1100 | size : thisFileStats.size, |
| 1101 | }, |
| 1102 | }) |
| 1103 | } |
| 1104 | |
| 1105 | /** |
| 1106 | * Get version of a collection |
no test coverage detected