Is there a simple way of modifying a file?
# announcements
m
Is there a simple way of modifying a file?
a
Modifying in the sense of changing line by line?
m
yeah, I want to remove prefix of the string in each line
a
@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
seems to me it requires a temporary file