Skip to content

Commit d627259

Browse files
committed
fix
1 parent 6bad425 commit d627259

File tree

7 files changed

+10
-4
lines changed

7 files changed

+10
-4
lines changed

core/apple/src/files/FileSystemApple.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
package kotlinx.io.files
88

9+
import files.SystemPathSeparator
910
import kotlinx.cinterop.ExperimentalForeignApi
1011
import kotlinx.cinterop.cstr
1112
import kotlinx.cinterop.memScoped

core/common/src/files/Paths.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public expect val SystemPathSeparator: Char
7575
public expect fun Path(path: String): Path
7676

7777
/**
78-
* Returns Path for the given [base] path concatenated with [parts] using [SystemPathSeparator].
78+
* Returns Path for the given [base] path concatenated with [parts] using [files.SystemPathSeparator].
7979
*/
8080
public fun Path(base: String, vararg parts: String): Path {
8181
// Parameter name has to be specified explicitly to overcome https://youtrack.jetbrains.com/issue/KT-22520
@@ -91,7 +91,7 @@ public fun Path(base: String, vararg parts: String): Path {
9191
}
9292

9393
/**
94-
* Returns Path for the given [base] path concatenated with [parts] using [SystemPathSeparator].
94+
* Returns Path for the given [base] path concatenated with [parts] using [files.SystemPathSeparator].
9595
*/
9696
public fun Path(base: Path, vararg parts: String): Path {
9797
return Path(base.toString(), *parts)

core/common/test/files/SmokeFileTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class SmokeFileTest {
186186
@Test
187187
fun pathParent() {
188188
val p = Path(SystemPathSeparator.toString(), "a", "b", "c")
189-
assertEquals(constructAbsolutePath("a", "b"), p.parent?.toString())
189+
assertEquals(constructAbsolutePath("a", "b").also { println(it) }, p.parent?.toString())
190190
assertEquals(constructAbsolutePath("a"), p.parent?.parent?.toString())
191191
assertEquals(constructAbsolutePath(), p.parent?.parent?.parent?.toString())
192192
assertNull(p.parent?.parent?.parent?.parent)

core/mingw/src/files/PathsMingw.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package kotlinx.io.files
2+
3+
public actual val SystemPathSeparator: Char get() = WindowsPathSeparator

core/native/src/files/PathsNative.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public actual class Path internal constructor(
5454
}
5555
}
5656

57-
public actual val SystemPathSeparator: Char get() = UnixPathSeparator
5857

5958
internal expect fun dirnameImpl(path: String): String
6059

core/posix/src/files/PathsPosix.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package kotlinx.io.files
2+
3+
public actual val SystemPathSeparator: Char get() = UnixPathSeparator

0 commit comments

Comments
 (0)