equal
deleted
inserted
replaced
267 if (path.is_file) move(path, path.backup2) |
267 if (path.is_file) move(path, path.backup2) |
268 write(path, text) |
268 write(path, text) |
269 } |
269 } |
270 |
270 |
271 |
271 |
|
272 /* change */ |
|
273 |
|
274 def change(file: JFile, f: String => String): Unit = write(file, f(read(file))) |
|
275 def change(path: Path, f: String => String): Unit = write(path, f(read(path))) |
|
276 |
|
277 |
272 /* append */ |
278 /* append */ |
273 |
279 |
274 def append(file: JFile, text: CharSequence): Unit = |
280 def append(file: JFile, text: CharSequence): Unit = |
275 Files.write(file.toPath, UTF8.bytes(text.toString), |
281 Files.write(file.toPath, UTF8.bytes(text.toString), |
276 StandardOpenOption.APPEND, StandardOpenOption.CREATE) |
282 StandardOpenOption.APPEND, StandardOpenOption.CREATE) |