美文网首页
获取根目录文件名数组

获取根目录文件名数组

作者: lbhw | 来源:发表于2016-04-06 12:01 被阅读29次
     let fileManager = NSFileManager.defaultManager()
     let path = NSBundle.mainBundle().resourcePath!
     let items = try! fileManager.contentsOfDirectoryAtPath(path)

items的类型为String](),内容为应用根目录下的文件名的集合。

相关文章

网友评论

      本文标题:获取根目录文件名数组

      本文链接:https://www.haomeiwen.com/subject/itqmlttx.html