title: Storing file names in an array Swift
body: <p>I am looking for the code that will allow me to scan a folder in my project, and store all file names with a .jpg extension in an array. 
  This is the code I have to scan the main folder of my xcode project, however how do I store the names of files found inside, within an array?</p>
  
  <pre><code>let filemanager:NSFileManager = NSFileManager()
  let files = filemanager.enumeratorAtPath(NSHomeDirectory())
  while let file = files?.nextObject() {
      // store all file names with extension (jpg) in array
  }
  </code></pre>