index.js
function (oldPath, fls) {
        console.log(":::~~processing your temp folder and file~~:::"+oldPath);
        var parsedPath = updateFileNamePath(path.parse(oldPath), fls);
        var newPath = path.format(parsedPath);
        var firstFolderName = utils.getFirstFolderName(oldPath, tempFolderName);
        fs.renameSync(oldPath, newPath);
        if (replaceContentLength > 0 && ignoreExtentions.indexOf(parsedPath.ext) < 0 && ignoreFolders.indexOf(firstFolderName) < 0) {
            console.log(":::~~writing your temp file~~:::"+newPath);
            var oldContent = fs.readFileSync(newPath, 'utf8');
            var newContent = updateFileContent(oldContent, fls.replaceContent, fls);
            fs.writeFileSync(newPath, newContent);
        }else{
            console.log(":::~~skipping writing of your temp file~~:::"+newPath);
        }
    }
function (oldPath, fls) {
        console.log(":::~~processing your temp folder and file~~:::"+oldPath);
        var parsedPath = updateFileNamePath(path.parse(oldPath), fls);
        var newPath = path.format(parsedPath);
        var firstFolderName = utils.getFirstFolderName(oldPath, tempFolderName);
        fs.renameSync(oldPath, newPath);
        if (replaceContentLength > 0 && ignoreExtentions.indexOf(parsedPath.ext) < 0 && ignoreFolders.indexOf(firstFolderName) < 0) {
            console.log(":::~~writing your temp file~~:::"+newPath);
            var oldContent = fs.readFileSync(newPath, 'utf8');
            var newContent = updateFileContent(oldContent, fls.replaceContent, fls);
            fs.writeFileSync(newPath, newContent);
        }else{
            console.log(":::~~skipping writing of your temp file~~:::"+newPath);
        }
    }
function ( oldPath , fls ) { console . log ( ":::~~processing your temp folder and file~~:::" + oldPath ) ; var parsedPath = updateFileNamePath ( path . parse ( oldPath ) , fls ) ; var newPath = path . format ( parsedPath ) ; var firstFolderName = utils . getFirstFolderName ( oldPath , tempFolderName ) ; fs . renameSync ( oldPath , newPath ) ; if ( replaceContentLength > 0 && ignoreExtentions . indexOf ( parsedPath . ext ) < 0 && ignoreFolders . indexOf ( firstFolderName ) < 0 ) { console . log ( ":::~~writing your temp file~~:::" + newPath ) ; var oldContent = fs . readFileSync ( newPath , 'utf8' ) ; var newContent = updateFileContent ( oldContent , fls . replaceContent , fls ) ; fs . writeFileSync ( newPath , newContent ) ; } else { console . log ( ":::~~skipping writing of your temp file~~:::" + newPath ) ; } }
Process files that were recently copied in temp directory
@param {*} oldPath
@param {*} fls
Process files that were recently copied in temp directory