Compare commits
1 Commits
1.5.1
...
3a7b57d10e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a7b57d10e |
@@ -4,11 +4,11 @@ import PackageDescription
|
||||
let package = Package(
|
||||
name: "swiftpm-pathkit",
|
||||
products: [
|
||||
.library(name: "PathKit", targets: ["PathKit"]),
|
||||
.library(name: "Path", targets: ["Path"]),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "PathKit", path: "Sources"),
|
||||
.testTarget(name: "PathTests", dependencies: ["PathKit"]),
|
||||
.target(name: "Path", path: "Sources"),
|
||||
.testTarget(name: "PathTests", dependencies: ["Path"]),
|
||||
],
|
||||
swiftLanguageVersions: [.v4, .v4_2, .version("5")]
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@ results.
|
||||
## Examples
|
||||
|
||||
```swift
|
||||
import PathKit
|
||||
import Path
|
||||
|
||||
// convenient static members
|
||||
let home = Path.home
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import Foundation
|
||||
#if canImport(Glibc)
|
||||
#if os(Linux)
|
||||
import Glibc
|
||||
#elseif canImport(Musl)
|
||||
import Musl
|
||||
#endif
|
||||
|
||||
public extension Pathish {
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
import Foundation
|
||||
#if canImport(Darwin)
|
||||
#if !os(Linux)
|
||||
import func Darwin.realpath
|
||||
let _realpath = Darwin.realpath
|
||||
#elseif canImport(Glibc)
|
||||
#else
|
||||
import func Glibc.realpath
|
||||
let _realpath = Glibc.realpath
|
||||
#elseif canImport(Musl)
|
||||
import func Musl.realpath
|
||||
let _realpath = Musl.realpath
|
||||
#endif
|
||||
|
||||
public typealias PathStruct = Path
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import Foundation
|
||||
#if canImport(Darwin)
|
||||
import Darwin
|
||||
#elseif canImport(Glibc)
|
||||
#if os(Linux)
|
||||
import func Glibc.access
|
||||
#elseif canImport(Musl)
|
||||
import func Musl.access
|
||||
#else
|
||||
import Darwin
|
||||
#endif
|
||||
|
||||
public extension Pathish {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import XCTest
|
||||
import PathKit
|
||||
import Path
|
||||
|
||||
extension PathTests {
|
||||
func testFindMaxDepth1() throws {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@testable import PathKit
|
||||
@testable import Path
|
||||
import func XCTest.XCTAssertEqual
|
||||
import Foundation
|
||||
import XCTest
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@testable import PathKit
|
||||
@testable import Path
|
||||
import Foundation
|
||||
|
||||
class TemporaryDirectory {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import XCTest
|
||||
import PathKit
|
||||
import Path
|
||||
|
||||
#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) {
|
||||
|
||||
Reference in New Issue
Block a user