INNER CODE UNIT · JavaScript
allTargetFilesExists
Megabyteceer/thing-editor · thing-editor/electron-main/build-sounds.js:56
let allTargetFilesExists = options.formats.every((ext) => {
return fs.existsSync(fileNameWithoutExt + ext);
});
let hash;
if (cache.hasOwnProperty(fn) && (mTime !== cache[fn].mTime)) {
hash = await md5FileSafe(fn);
if (cache[fn].hash === hash) {
cache[fn].mTime = mTime;
}
}
if (!allTargetFilesExists || (options.noCacheSoundName === fn) || !cache.hasOwnProperty(fn) || (mTime !== cache[fn].mTime) || (bitrate !== cache[fn].bitrate) || !cache[fn].duration) {
if (!hash) {
hash = await md5FileSafe(fn);
}
cache[fn] = {
mTime,