title: What does Dir [ ] do?
body: <p>I need to change some functionality in a Ruby script that somebody else wrote. I have never used Ruby before, but am very familiar with Python, which makes some things easier, however, I am struggling with the below code.</p>
  
  <p>I am familiar with join, and I figured out that *.mdb gets all files ending in .mdb, but can't figure out what the enclosing Dir[] does.</p>
  
  <p>Upon removing of Dir[] the output changes from a list of files simply to the string 'c:/*.mdb'.</p>
  
  <p>Would anybody be able to explain please?</p>
  
  <p><code>mdb_files = Dir[::File.join('C:/', '*.mdb')]</code></p>