Delete the removeFileIfExists funtion
I have no idea why I did write this helper function at the begining.
This commit is contained in:
parent
dfc13a37d3
commit
653ce515ab
2 changed files with 10 additions and 27 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue