title: How to read a Bunch of files in a directory in lua
body: <p>I have a path (as a string) to a directory. In that directory, are a bunch of text files. I want to go to that directory open it, and go to each text file and read the data.</p>
  
  <p>I've tried</p>
  
  <pre><code>f = io.open(path)
  f:read("*a")
  </code></pre>
  
  <p>I get the error "nil    Is a directory"</p>
  
  <p>I've tried:</p>
  
  <pre><code>f = io.popen(path)
  </code></pre>
  
  <p>I get the error: "Permission denied"</p>
  
  <p>Is it just me, but it seems to be a lot harder than it should be to do basic file io in lua?</p>