more operations;
authorwenzelm
Thu, 22 Jun 2023 14:51:37 +0200
changeset 78194 da721ba809a4
parent 78193 443a443bbe7b
child 78195 93266b0340f8
more operations;
src/Pure/General/bytes.scala
--- a/src/Pure/General/bytes.scala	Thu Jun 22 14:29:05 2023 +0200
+++ b/src/Pure/General/bytes.scala	Thu Jun 22 14:51:37 2023 +0200
@@ -103,6 +103,14 @@
     using(new FileOutputStream(file))(bytes.write_stream(_))
 
   def write(path: Path, bytes: Bytes): Unit = write(path.file, bytes)
+
+
+  /* append */
+
+  def append(file: JFile, bytes: Bytes): Unit =
+    using(new FileOutputStream(file, true))(bytes.write_stream(_))
+
+  def append(path: Path, bytes: Bytes): Unit = append(path.file, bytes)
 }
 
 final class Bytes private(