File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,9 @@ public sealed interface FileSystem {
65
65
* filesystems (or different volumes, on Windows) and the operation could not be performed atomically,
66
66
* [UnsupportedOperationException] is thrown.
67
67
*
68
+ * When [destination] is an existing directory, the operation may fail on some platforms
69
+ * (on Windows, particularly).
70
+ *
68
71
* @param source the path to rename.
69
72
* @param destination desired path name.
70
73
*
Original file line number Diff line number Diff line change @@ -117,21 +117,6 @@ class SmokeFileTest {
117
117
FileSystem .System .atomicMove(src, dst)
118
118
assertFalse(FileSystem .System .exists(src))
119
119
assertTrue(FileSystem .System .exists(dst))
120
-
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
-
130
- val dstFile = createTempPath()
131
- FileSystem .System .sink(dstFile).buffered().use { it.writeString(" hehe" ) }
132
- val srcDir = createTempPath()
133
- FileSystem .System .createDirectories(srcDir)
134
- assertFailsWith<IOException > { FileSystem .System .atomicMove(srcDir, dstFile) }
135
120
}
136
121
137
122
@Test
You can’t perform that action at this time.
0 commit comments