feat: Moving things into separate modules.

This commit is contained in:
2024-12-22 11:32:52 -05:00
parent 0484f45d57
commit 84ac4a6a12
11 changed files with 64 additions and 64 deletions

View File

@@ -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
}