src/Pure/General/file.scala
changeset 73340 0ffcad1f6130
parent 73318 a45cb064709b
child 73367 77ef8bef0593
--- a/src/Pure/General/file.scala	Mon Mar 01 20:12:09 2021 +0100
+++ b/src/Pure/General/file.scala	Mon Mar 01 22:22:12 2021 +0100
@@ -160,7 +160,7 @@
     follow_links: Boolean = false): List[JFile] =
   {
     val result = new mutable.ListBuffer[JFile]
-    def check(file: JFile) { if (pred(file)) result += file }
+    def check(file: JFile): Unit = if (pred(file)) result += file
 
     if (start.isFile) check(start)
     else if (start.isDirectory) {
@@ -243,7 +243,8 @@
   def writer(file: JFile): BufferedWriter =
     new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), UTF8.charset))
 
-  def write_file(file: JFile, text: CharSequence, make_stream: OutputStream => OutputStream)
+  def write_file(
+    file: JFile, text: CharSequence, make_stream: OutputStream => OutputStream): Unit =
   {
     val stream = make_stream(new FileOutputStream(file))
     using(new BufferedWriter(new OutputStreamWriter(stream, UTF8.charset)))(_.append(text))
@@ -263,13 +264,13 @@
     write_xz(path.file, text, options)
   def write_xz(path: Path, text: CharSequence): Unit = write_xz(path, text, XZ.options())
 
-  def write_backup(path: Path, text: CharSequence)
+  def write_backup(path: Path, text: CharSequence): Unit =
   {
     if (path.is_file) Isabelle_System.move_file(path, path.backup)
     write(path, text)
   }
 
-  def write_backup2(path: Path, text: CharSequence)
+  def write_backup2(path: Path, text: CharSequence): Unit =
   {
     if (path.is_file) Isabelle_System.move_file(path, path.backup2)
     write(path, text)
@@ -318,7 +319,7 @@
     else path.file.canExecute
   }
 
-  def set_executable(path: Path, flag: Boolean)
+  def set_executable(path: Path, flag: Boolean): Unit =
   {
     if (Platform.is_windows && flag) Isabelle_System.chmod("a+x", path)
     else if (Platform.is_windows) Isabelle_System.chmod("a-x", path)