mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-20 02:05:39 -04:00
Initial commit
This commit is contained in:
parent
9197011230
commit
2ed311a818
184 changed files with 8052 additions and 2 deletions
30
Shared/HelperToolLaunchdPropertyList.swift
Normal file
30
Shared/HelperToolLaunchdPropertyList.swift
Normal file
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// HelperToolLaunchdPropertyList.swift
|
||||
// Mist
|
||||
//
|
||||
// Created by Nindi Gill on 21/6/2022.
|
||||
//
|
||||
|
||||
import EmbeddedPropertyList
|
||||
import Foundation
|
||||
|
||||
struct HelperToolLaunchdPropertyList: Decodable, Equatable {
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case machServices = "MachServices"
|
||||
case label = "Label"
|
||||
}
|
||||
|
||||
let machServices: [String: Bool]
|
||||
let label: String
|
||||
|
||||
init() throws {
|
||||
let data: Data = try EmbeddedPropertyListReader.launchd.readInternal()
|
||||
self = try PropertyListDecoder().decode(HelperToolLaunchdPropertyList.self, from: data)
|
||||
}
|
||||
|
||||
init(from url: URL) throws {
|
||||
let data: Data = try EmbeddedPropertyListReader.launchd.readExternal(from: url)
|
||||
self = try PropertyListDecoder().decode(HelperToolLaunchdPropertyList.self, from: data)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue