Provide info about the iTunes File Sharing

- only when key files are not existed (not downloaded/pasted/imported)
This commit is contained in:
Yishi Lin 2017-06-07 16:54:54 +08:00
parent 3cde0d954c
commit 6daa84df30
3 changed files with 34 additions and 17 deletions

View file

@ -805,4 +805,14 @@ class PasswordStore {
Defaults.remove(.gitSSHPrivateKeyURL)
Utils.removeKeychain(name: ".gitSSHPrivateKeyPassphrase")
}
func gitSSHKeyExists() -> Bool {
let fm = FileManager.default
return fm.fileExists(atPath: Globals.gitSSHPrivateKeyPath)
}
func pgpKeyExists() -> Bool {
let fm = FileManager.default
return fm.fileExists(atPath: Globals.pgpPublicKeyPath) && fm.fileExists(atPath: Globals.pgpPrivateKeyPath)
}
}