2

I have the following code:

var error: NSError?

let filesInDirectory: [String]! = fileManager.contentsOfDirectoryAtPath(tmpDir, error: &error) as? [String]

This returns a list with all of the names of the files in the app's local directory. I need to know how to do this for folders which I have stored in my Xcode project.

whatevs

Does anybody know how I could get an effect similar to the above code which returns a list of the files in a directory. Except instead of being stored in the app's local directory, it is instead stored in the Xcode project. How can I get the program to make a list of all of the file names in the data folder?

Matt Spoon
  • 2,760
  • 5
  • 25
  • 41
  • "Except instead of being stored in the app's local directory, it is instead stored in the Xcode project" – not sure what you mean by this; does this folder contain data that your app uses? if so, it **will** be in the app bundle. – The Paramagnetic Croissant Jun 30 '15 at 06:34
  • I mean as in the data is stored in the same directory within the Xcode project as the view controllers and the main storyboard etc. – Matt Spoon Jun 30 '15 at 07:45

0 Answers0