https://kotlinlang.org logo
#announcements
Title
# announcements
m

mike_shysh

10/31/2017, 5:21 PM
Is there a simple way of modifying a file?
a

Andreas Sinz

10/31/2017, 6:38 PM
Modifying in the sense of changing line by line?
m

mike_shysh

11/01/2017, 7:14 AM
yeah, I want to remove prefix of the string in each line
a

Andreas Sinz

11/01/2017, 11:55 AM
@mike_shysh then I'd go with https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-file/read-lines.html, remove the prefix and write the lines back into the file
m

mike_shysh

11/01/2017, 6:11 PM
seems to me it requires a temporary file
2 Views