Skip to content

Instantly share code, notes, and snippets.

@kos9kus
Created October 2, 2019 17:17
Show Gist options
  • Save kos9kus/afd61e3f3f9d54ffb1c4ec3b74505459 to your computer and use it in GitHub Desktop.
Save kos9kus/afd61e3f3f9d54ffb1c4ec3b74505459 to your computer and use it in GitHub Desktop.
test
// public func save() {
// let appDirs = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
// guard let libraryDirectory = appDirs.first else {
// return
// }
// let files = (try? obtainDBFolderURL())?.path ?? ""
// let swiftArray = try? FileManager.default.contentsOfDirectory(atPath: files)
// swiftArray?.forEach({ path in
// if let urlComponents = URL(fileURLWithPath: path).pathComponents.last {
// let p = libraryDirectory + "/" + urlComponents
// do {
// try FileManager.default.copyItem(atPath: files + "/" + path, toPath: p)
// } catch let er {
// //swiftlint:disable deny_print
// print("KK \(er)")
// }
// }
// })
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment