mgrLM // +userOverrideModelDataPath.

This commit is contained in:
ShikiSuen 2022-06-22 21:05:14 +08:00
parent 079db9027b
commit 3f1d939647
1 changed files with 5 additions and 0 deletions

View File

@ -250,6 +250,11 @@ enum mgrLangModel {
return URL(fileURLWithPath: dataFolderPath(isDefaultFolder: false)).appendingPathComponent(fileName).path return URL(fileURLWithPath: dataFolderPath(isDefaultFolder: false)).appendingPathComponent(fileName).path
} }
static func userOverrideModelDataPath(_ mode: InputMode) -> String {
let fileName = (mode == InputMode.imeModeCHT) ? "override-model-data-chs.dat" : "override-model-data-cht.dat"
return URL(fileURLWithPath: dataFolderPath(isDefaultFolder: false)).appendingPathComponent(fileName).path
}
// MARK: - 使 // MARK: - 使
static func ensureFileExists( static func ensureFileExists(