Template support for input parameters #4
15
Sources/Library/Extensions/URL+Inits.swift
Normal file
15
Sources/Library/Extensions/URL+Inits.swift
Normal file
@ -0,0 +1,15 @@
|
||||
import Foundation
|
||||
|
||||
extension URL {
|
||||
|
||||
// MARK: Initialisers
|
||||
|
||||
init(at filePath: String) {
|
||||
if #available(macOS 13.0, *) {
|
||||
self = URL(filePath: filePath)
|
||||
} else {
|
||||
self = URL(fileURLWithPath: filePath)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user