This commit is contained in:
2023-03-14 16:23:16 -04:00
parent 37f3bfde62
commit 78bfa7863a
18 changed files with 237 additions and 217 deletions

View File

@@ -0,0 +1,20 @@
import Foundation
func parseTarget(_ target: String) -> URL {
let url = URL(fileURLWithPath: target)
let urlTest = url
.deletingLastPathComponent()
guard urlTest.lastPathComponent == "Sources" else {
return URL(fileURLWithPath: "Sources")
.appendingPathComponent(target)
}
return url
}
extension URL {
func fileString() -> String {
self.absoluteString
.replacingOccurrences(of: "file://", with: "")
}
}