cedric
04/03/2017, 8:58 PMcopyRecursively
is changing the target from a directory to a file:
fun main(args: Array<String>) {
val from = File("/tmp/foo").apply { writeText("I'm a file") }
val to = File("/tmp/to").apply {
deleteRecursively()
mkdirs()
}
from.copyRecursively(to, overwrite = true)
if (! to.isDirectory) {
throw AssertionError("Should be a directory")
}
}
orangy
cedric
04/03/2017, 9:30 PMcopyTo
, which copyRecursively
calls. Haven’t dug further