function doSearchInFiles(fileList, queryExpr, startFileIndex, maxResultsToReturn) {
    var i;
    if (fileList.length === 0) {
        console.log('no files found');
        return;

    } else {
        startFileIndex = startFileIndex || 0;
        for (i = startFileIndex; i < fileList.length && !foundMaximum; i++) {
            doSearchInOneFile(fileList[i], getFileContentsForFile(fileList[i]), queryExpr, maxResultsToReturn);
        }
        lastSearchedIndex = i;
    }
}
Search in the list of files given and populate the results
@param {array} fileList           array of file paths
@param {Object} queryExpr
@param {number} startFileIndex    the start index of the array from which the search has to be done
@param {number} maxResultsToReturn  the maximum number of results to return in this search