Skip to content

Commit d3d7a77

Browse files
committed
Updated doc, removed some checks from the atomicMoveDir test
1 parent a086319 commit d3d7a77

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

core/common/src/files/FileSystem.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public sealed interface FileSystem {
6565
* filesystems (or different volumes, on Windows) and the operation could not be performed atomically,
6666
* [UnsupportedOperationException] is thrown.
6767
*
68+
* When [destination] is an existing directory, the operation may fail on some platforms
69+
* (on Windows, particularly).
70+
*
6871
* @param source the path to rename.
6972
* @param destination desired path name.
7073
*

core/common/test/files/SmokeFileTest.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,6 @@ class SmokeFileTest {
118118
assertFalse(FileSystem.System.exists(src))
119119
assertTrue(FileSystem.System.exists(dst))
120120

121-
val src2 = createTempPath()
122-
FileSystem.System.createDirectories(src2)
123-
FileSystem.System.atomicMove(src2, dst)
124-
assertFalse(FileSystem.System.exists(src2))
125-
126-
val src3 = createTempPath()
127-
FileSystem.System.sink(src3).buffered().use { it.writeString("hehe") }
128-
assertFailsWith<IOException> { FileSystem.System.atomicMove(src3, dst) }
129-
130121
val dstFile = createTempPath()
131122
FileSystem.System.sink(dstFile).buffered().use { it.writeString("hehe") }
132123
val srcDir = createTempPath()

0 commit comments

Comments
 (0)