function cleanupAndSetProjectSplashScreenImage()

in lib/prepare.js [558:571]


function cleanupAndSetProjectSplashScreenImage (srcFile, destFilePath, possiblePreviousDestFilePath, cleanupOnly = false) {
    if (fs.existsSync(possiblePreviousDestFilePath)) {
        fs.rmSync(possiblePreviousDestFilePath);
    }

    if (cleanupOnly && fs.existsSync(destFilePath)) {
        // Also remove dest file path for cleanup even if previous was not use.
        fs.rmSync(destFilePath);
    }

    if (!cleanupOnly && srcFile && fs.existsSync(srcFile)) {
        fs.cpSync(srcFile, destFilePath);
    }
}