mikehearn
10/04/2021, 4:48 PMjava.io.File
instead of java.nio.file.Path
? I assume this is to do with the legacy Java 1.6 support but it's quite awkward for programs that want to benefit from the NIO features like in-memory file systems, etc.nfrankel
10/04/2021, 4:53 PMephemient
10/04/2021, 5:10 PMephemient
10/04/2021, 5:11 PMmikehearn
10/04/2021, 5:14 PMephemient
10/04/2021, 5:20 PMmikehearn
10/04/2021, 6:42 PMjw
10/04/2021, 7:22 PMephemient
10/04/2021, 7:32 PMpniederw
10/05/2021, 6:28 AMPath.walk() // -> Files.walk()
Path.createTempFile() // -> Files.createTempFile()
Path.writeString() // -> Files.writeString() (more efficient than Path.writeText())
Path.readString() // -> Files.readString() (more efficient than Path.readText())
Path.deleteRecursively() // -> Files.walk()
Path.createParentDirectories() // dedicated method because we need this a lot
rnett
10/05/2021, 7:41 AMPath.parent.mkdir(true)
or similarephemient
10/05/2021, 7:42 AMpath.parent?.createDirectories()
but yeah, those sound good to raise somewhere more formalpniederw
10/05/2021, 8:24 AMfun Path.createParentDirectories(vararg attributes: FileAttribute<*>): Path =
apply { parent?.createDirectories(*attributes) }
pniederw
10/05/2021, 8:26 AMpath.createParentDirectories().writeString("hello")
mikehearn
10/05/2021, 9:12 AMmikehearn
10/05/2021, 9:16 AM