Compare commits

..

1 Commits

Author SHA1 Message Date
T. R. Bernstein
3a7b57d10e Adapt for new repository 2025-09-30 12:13:17 +02:00
9 changed files with 19 additions and 26 deletions

View File

@@ -4,11 +4,11 @@ import PackageDescription
let package = Package( let package = Package(
name: "swiftpm-pathkit", name: "swiftpm-pathkit",
products: [ products: [
.library(name: "PathKit", targets: ["PathKit"]), .library(name: "Path", targets: ["Path"]),
], ],
targets: [ targets: [
.target(name: "PathKit", path: "Sources"), .target(name: "Path", path: "Sources"),
.testTarget(name: "PathTests", dependencies: ["PathKit"]), .testTarget(name: "PathTests", dependencies: ["Path"]),
], ],
swiftLanguageVersions: [.v4, .v4_2, .version("5")] swiftLanguageVersions: [.v4, .v4_2, .version("5")]
) )

View File

@@ -12,7 +12,7 @@ results.
## Examples ## Examples
```swift ```swift
import PathKit import Path
// convenient static members // convenient static members
let home = Path.home let home = Path.home

View File

@@ -1,8 +1,6 @@
import Foundation import Foundation
#if canImport(Glibc) #if os(Linux)
import Glibc import Glibc
#elseif canImport(Musl)
import Musl
#endif #endif
public extension Pathish { public extension Pathish {

View File

@@ -1,13 +1,10 @@
import Foundation import Foundation
#if canImport(Darwin) #if !os(Linux)
import func Darwin.realpath import func Darwin.realpath
let _realpath = Darwin.realpath let _realpath = Darwin.realpath
#elseif canImport(Glibc) #else
import func Glibc.realpath import func Glibc.realpath
let _realpath = Glibc.realpath let _realpath = Glibc.realpath
#elseif canImport(Musl)
import func Musl.realpath
let _realpath = Musl.realpath
#endif #endif
public typealias PathStruct = Path public typealias PathStruct = Path

View File

@@ -1,10 +1,8 @@
import Foundation import Foundation
#if canImport(Darwin) #if os(Linux)
import Darwin
#elseif canImport(Glibc)
import func Glibc.access import func Glibc.access
#elseif canImport(Musl) #else
import func Musl.access import Darwin
#endif #endif
public extension Pathish { public extension Pathish {

View File

@@ -1,5 +1,5 @@
import XCTest import XCTest
import PathKit import Path
extension PathTests { extension PathTests {
func testFindMaxDepth1() throws { func testFindMaxDepth1() throws {

View File

@@ -1,4 +1,4 @@
@testable import PathKit @testable import Path
import func XCTest.XCTAssertEqual import func XCTest.XCTAssertEqual
import Foundation import Foundation
import XCTest import XCTest

View File

@@ -1,4 +1,4 @@
@testable import PathKit @testable import Path
import Foundation import Foundation
class TemporaryDirectory { class TemporaryDirectory {

View File

@@ -1,5 +1,5 @@
import XCTest import XCTest
import PathKit import Path
#if swift(>=5.3) #if swift(>=5.3)
func XCTAssertEqual<P: Pathish>(_ set1: Set<Path>, _ set2: Set<Path>, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, line: UInt = #line, relativeTo: P) { func XCTAssertEqual<P: Pathish>(_ set1: Set<Path>, _ set2: Set<Path>, _ message: @autoclosure () -> String = "", file: StaticString = #filePath, line: UInt = #line, relativeTo: P) {