title: Read file with Javascript Fetch API without knowing the name of the file
body: <p>I have a directory of text files called <code>./text-files</code>. I can read files using the fetch API like this:</p>
  
  <pre><code>fetch('./text-files/foo.txt')
    then(res =&gt; {
      return res.text()
    })
    .then(text =&gt; {
      console.log(text)
    })
  </code></pre>
  
  <p>Does the fetch API support some way to read a directory of files without knowing the specific name of the files only the file extension?</p>
  
  <p>Ideally, I'd like some way to get a list of all files in the directory <code>./text-files</code> and then read each one serially using fetch. Is this possible? If it's possible to read one file off disk in Javascript, I would think there'd be some way to get a list of file and read each of them?</p>
  
  <p>I was trying to do something like this, which didn't work:</p>
  
  <pre><code>fetch('./text-files/*.txt')
    then(res =&gt; {
      return res.text()
    })
    .then(text =&gt; {
      console.log(text)
    })
  </code></pre>