function processSingleFile(sourceName, destinationName, type) {
    var data;
    try {
        data = fs.readFileSync(sourceName);
    } catch (e) {
        logger.error(langUtil.getTranslation('Code_ReadMusicCacheFailure') + e.message, type);
        return;
    }
    for (var i = 0; i < data.length; i++) {
        data[i] = data[i] ^ 0xA3;
    }
    try {
        fs.writeFileSync(destinationName, data);
    } catch (e) {
        logger.error(langUtil.getTranslation('Code_WriteMusicCacheFailure') + e.message, type);
        return;
    }
    logger.primary(langUtil.getTranslation('Code_DecodeFinished') + '(' + getFilenameFromFullPath(sourceName) + " --> " + getFilenameFromFullPath(destinationName) + ")", type);
}
/**
 * Parse single cache file.
 * This function can be reused on batch processing
 * @param {String} filename 
 */
Parse single cache file.
This function can be reused on batch processing
@param {String} filename
Parse single cache file . This function can be reused on batch processing @param { String } filename
function processSingleFile(sourceName, destinationName, type) {
    var data;
    try {
        data = fs.readFileSync(sourceName);
    } catch (e) {
        logger.error(langUtil.getTranslation('Code_ReadMusicCacheFailure') + e.message, type);
        return;
    }
    for (var i = 0; i < data.length; i++) {
        data[i] = data[i] ^ 0xA3;
    }
    try {
        fs.writeFileSync(destinationName, data);
    } catch (e) {
        logger.error(langUtil.getTranslation('Code_WriteMusicCacheFailure') + e.message, type);
        return;
    }
    logger.primary(langUtil.getTranslation('Code_DecodeFinished') + '(' + getFilenameFromFullPath(sourceName) + " --> " + getFilenameFromFullPath(destinationName) + ")", type);
}
function processSingleFile ( sourceName , destinationName , type ) { var data ; try { data = fs . readFileSync ( sourceName ) ; } catch ( e ) { logger . error ( langUtil . getTranslation ( 'Code_ReadMusicCacheFailure' ) + e . message , type ) ; return ; } for ( var i = 0 ; i < data . length ; i ++ ) { data [ i ] = data [ i ] ^ 0xA3 ; } try { fs . writeFileSync ( destinationName , data ) ; } catch ( e ) { logger . error ( langUtil . getTranslation ( 'Code_WriteMusicCacheFailure' ) + e . message , type ) ; return ; } logger . primary ( langUtil . getTranslation ( 'Code_DecodeFinished' ) + '(' + getFilenameFromFullPath ( sourceName ) + " --> " + getFilenameFromFullPath ( destinationName ) + ")" , type ) ; }
Parse single cache file.
Parse single cache file .