Getting a list of files in the Resources folder - iOS

前端 未结 7 2137
悲哀的现实
悲哀的现实 2020-11-28 19:52

Let\'s say I have a folder in my \"Resources\" folder of my iPhone application called \"Documents\".

Is there a way that I can get an array or some type of list of a

相关标签:
7条回答
  • 2020-11-28 20:44

    Swift version:

        if let files = try? FileManager.default.contentsOfDirectory(atPath: Bundle.main.bundlePath ){
            for file in files {
                print(file)
            }
        }
    
    0 讨论(0)
提交回复
热议问题