?? "UnknownAppliation"
}
+func localizedAppName() -> String {
+
+ guard let name = Bundle.main.localizedInfoDictionary?["CFBundleName"] as? String,
+ !name.isEmpty else {
+
+ return supportDirName()
+ }
+
+ return name
+}
+
struct ApplicationDirecrories {
+ static let shared = ApplicationDirecrories()
+
static let support = searchedURL(for: .applicationSupportDirectory)
.appendingPathComponent(supportDirName())
}
}
+
func createDirectory(_ url: URL) -> Bool {
do {
return true
- } catch (let error as NSError) {
+ } catch let error as NSError {
if create, error.code == NSFileReadNoSuchFileError {