通过NSFileManager获取document路径

通过NSFileManager获取document路径

 let fileManager = FileManager.default
  let urls = fileManager.urls(for: .documentDirectory, in: .userDomainMask)
  if let documentPath = urls.first
  {
       let dbPath = documentPath.appendingPathComponent("xxx.db")
       do
       {
             if try dbPath.checkResourceIsReachable()
             {
             }
       }
       catch
       { 
        }
  }
0 0 vote
Article Rating
Subscribe
提醒
guest
0 评论
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x