diff --git a/code/cli/munki/iconimporter/iconimporter.swift b/code/cli/munki/iconimporter/iconimporter.swift new file mode 100644 index 00000000..1b9a3cfa --- /dev/null +++ b/code/cli/munki/iconimporter/iconimporter.swift @@ -0,0 +1,11 @@ +// +// main.swift +// iconimporter +// +// Created by Greg Neagle on 9/13/24. +// + +import Foundation + +print("Hello, World!") + diff --git a/code/cli/munki/shared/munkirepo/FileRepo.swift b/code/cli/munki/shared/munkirepo/FileRepo.swift index 9e495da4..dc76bd2c 100644 --- a/code/cli/munki/shared/munkirepo/FileRepo.swift +++ b/code/cli/munki/shared/munkirepo/FileRepo.swift @@ -30,6 +30,7 @@ protocol Repo { func put(_ identifier: String, content: Data) throws func put(_ identifier: String, fromFile local_file_path: String) throws func delete(_ identifier: String) throws + func pathFor(_ identifier: String) -> String? } // MARK: share mounting functions @@ -286,4 +287,10 @@ class FileRepo: Repo { func delete(_ identifier: String) throws { try FileManager.default.removeItem(atPath: fullPath(identifier)) } + + /// Returns the filesystem path to the item in the repo + /// Non-filesystem Repo sublcasses should implement this but return nil + func pathFor(_ identifier: String) -> String? { + return fullPath(identifier) + } }