function getTextContentFromFiles(
  files: Array<File>,
  callback: (contents: string) => void,
): void {
  let readCount = 0;
  const results = [];
  files.forEach(function (/*blob*/ file) {
    readFile(file, function (/*string*/ text) {
      readCount++;
      text && results.push(text.slice(0, TEXT_SIZE_UPPER_BOUND));
      if (readCount == files.length) {
        callback(results.join('\r'));
      }
    });
  });
}
Extract the text content from a file list.