File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class SmokeFileTest {
16
16
var lastException: Throwable ? = null
17
17
files.forEach {
18
18
try {
19
- it.deleteRecursively( )
19
+ SystemFileSystem .delete(it, false )
20
20
} catch (t: Throwable ) {
21
21
lastException = t
22
22
}
@@ -26,14 +26,6 @@ class SmokeFileTest {
26
26
}
27
27
}
28
28
29
- private fun Path.deleteRecursively () {
30
- val md = SystemFileSystem .metadataOrNull(this ) ? : return
31
- if (md.isDirectory) {
32
- SystemFileSystem .list(this ).forEach { it.deleteRecursively() }
33
- }
34
- SystemFileSystem .delete(this )
35
- }
36
-
37
29
private fun createTempPath (): Path {
38
30
val f = Path (tempFileName())
39
31
files.add(f)
@@ -475,6 +467,10 @@ class SmokeFileTest {
475
467
SystemFileSystem .sink(it).close()
476
468
}
477
469
assertEquals(listOf (file, subdir), SystemFileSystem .list(dir))
470
+
471
+ SystemFileSystem .delete(file)
472
+ SystemFileSystem .delete(Path (subdir, " file" ))
473
+ SystemFileSystem .delete(subdir)
478
474
}
479
475
480
476
private fun constructAbsolutePath (vararg parts : String ): String {
You can’t perform that action at this time.
0 commit comments