Delete the removeFileIfExists funtion

I have no idea why I did write this helper function at the begining.
This commit is contained in:
Bob Sun 2018-11-16 22:49:41 -08:00
parent dfc13a37d3
commit 653ce515ab
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 10 additions and 27 deletions

View file

@ -11,20 +11,6 @@ import SwiftyUserDefaults
import KeychainAccess
public class Utils {
public static func removeFileIfExists(atPath path: String) {
let fm = FileManager.default
do {
if fm.fileExists(atPath: path) {
try fm.removeItem(atPath: path)
}
} catch {
print(error)
}
}
public static func removeFileIfExists(at url: URL) {
removeFileIfExists(atPath: url.path)
}
public static func getPasswordFromKeychain(name: String) -> String? {
let keychain = Keychain(service: Globals.bundleIdentifier, accessGroup: Globals.groupIdentifier)
do {