Skip to content

Instantly share code, notes, and snippets.

let fileMang = FileManager.default
var filePath = NSHomeDirectory()
do {
let appSupportDir = try FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
filePath = appSupportDir.appendingPathComponent("points.txt").path
}
catch{}
print(filePath)
if fileMang.fileExists(atPath: filePath) {
do {