feat: Moving things into separate modules.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import Foundation
|
||||
#if canImport(FoundationNetworking)
|
||||
import FoundationNetworking
|
||||
#endif
|
||||
import Logging
|
||||
|
||||
// TODO: Move.
|
||||
@_spi(Internal)
|
||||
public extension Logger.Level {
|
||||
|
||||
@@ -16,26 +13,3 @@ public extension Logger.Level {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@_spi(Internal)
|
||||
public extension URL {
|
||||
var cleanFilePath: String {
|
||||
absoluteString.replacingOccurrences(of: "file://", with: "")
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
@_spi(Internal)
|
||||
public func url(for path: String) -> URL {
|
||||
#if os(Linux)
|
||||
return URL(fileURLWithPath: path)
|
||||
#else
|
||||
if #available(macOS 13.0, *) {
|
||||
return URL(filePath: path)
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
return URL(fileURLWithPath: path)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user