function buildXMLResponse(request, arrayOfFiles, versioned = false) {
    const parsedUrl = url.parse(request.url);
    const parsedQs = querystring.parse(parsedUrl.query);

    const listParams = {
        prefix: validPath,
        maxKeys: parsedQs['max-keys'] || 1000,
        delimiter: '/',
    };
    const list = {
        IsTruncated: false,
        Versions: [],
        Contents: [],
        CommonPrefixes: [],
    };
    const entries = arrayOfFiles.map(file => ({
        key: file.name,
        value: {
            IsDeleteMarker: false,
            IsNull: true,
            LastModified: file['Last-Modified'],
            // Generated ETag alrady contains quotes, removing them here
            ETag: file.ETag.substring(1, file.ETag.length - 1),
            Size: file['Content-Length'],
            Owner: {
                ID: 0,
                DisplayName: 'Veeam SOSAPI',
            },
            StorageClass: 'VIRTUAL',
        }
    }));
    entries.push({
        key: validPath,
        value: {
            IsDeleteMarker: false,
            IsNull: true,
            LastModified: new Date().toISOString(),
            ETag: 'd41d8cd98f00b204e9800998ecf8427e',
            Size: 0,
            Owner: {
                ID: 0,
                DisplayName: 'Veeam SOSAPI',
            },
            StorageClass: 'VIRTUAL',
        }
    });
    // Add the folder as the base file
    if (versioned) {
        list.Versions = entries;
    } else {
        list.Contents = entries;
    }
    const processingXMLFunction = versioned ? processVersions : processMasterVersions;
    return processingXMLFunction(request.bucketName, listParams, list);
}
Utility function to build a standard response for the LIST route.
It adds the supported path by default as a static and default file.

@param {object} request - request object
@param {object} arrayOfFiles - array of files headers
@param {boolean} [versioned] - set to true if versioned listing is enabled
@returns {string} - the formatted XML content to send