Kotlin I/O review/M11 fixes: Stream --> Sequence, recurse() returned back,
additional helpers like File.bufferedReader() and String.byteInputStream(), copyRecursively / deleteRecursively were rewritten using FileTreeWalk, FilePathComponents introduced as a replacement of FileIterator, classes / methods / properties permissions fixed, Linux specific things, resolveSibling rewritten using FilePathComponents
This commit is contained in:
@@ -71,12 +71,12 @@ class ReadWriteTest {
|
||||
writer.close()
|
||||
|
||||
//file.replaceText("Hello\nWorld")
|
||||
file.forEachBlock{ (arr: ByteArray, size: Int) ->
|
||||
file.forEachBlock {(arr: ByteArray, size: Int) ->
|
||||
assertTrue(size >= 11 && size <= 12, size.toString())
|
||||
assertTrue(arr.contains('W'.toByte()))
|
||||
}
|
||||
val list = ArrayList<String>()
|
||||
file.forEachLine{
|
||||
file.forEachLine {
|
||||
list.add(it)
|
||||
}
|
||||
assertEquals(arrayListOf("Hello", "World"), list)
|
||||
|
||||
Reference in New Issue
Block a user