title: Iterate through files in a folder and its subfolders using Swift's FileManager
body: <p>I'm quite new to programming a Swift and I'm trying to iterate through the files in a folder.
  I took a look at the answer <a href="https://stackoverflow.com/a/5750519/1667981">here</a> and tried to translate it to Swift syntax, but didn't succeed.</p>
  
  <pre><code>let fileManager = NSFileManager.defaultManager()
  let enumerator:NSDirectoryEnumerator = fileManager.enumeratorAtPath(folderPath)
  
  for element in enumerator {
      //do something
  }
  </code></pre>
  
  <p>the error I get is:</p>
  
  <pre><code>Type 'NSDirectoryEnumerator' does not conform to protocol 'SequenceType'
  </code></pre>
  
  <p>My aim is to look at all the subfolders and files contained into the main folder and find all the files with a certain extension to then do something with them.</p>