merged
authorpaulson
Mon, 01 Mar 2021 14:47:08 +0000
changeset 73347 da4334257742
parent 73331 d045cdbdf243 (diff)
parent 73346 00e0f7724c06 (current diff)
child 73348 65c45cba3f54
merged
--- a/src/Pure/System/isabelle_system.ML	Mon Mar 01 14:46:51 2021 +0000
+++ b/src/Pure/System/isabelle_system.ML	Mon Mar 01 14:47:08 2021 +0000
@@ -71,8 +71,9 @@
 
 (* directory and file operations *)
 
-fun scala_function name args =
-  ignore (Scala.function name (space_implode "\000" (map (Path.implode o File.absolute_path) args)));
+val absolute_path = Path.implode o File.absolute_path;
+fun scala_function0 name = ignore o Scala.function name o space_implode "\000";
+fun scala_function name = scala_function0 name o map absolute_path;
 
 fun make_directory path = (scala_function "make_directory" [path]; path);
 
@@ -81,7 +82,8 @@
 fun copy_file src dst = scala_function "copy_file" [src, dst];
 
 fun copy_file_base (base_dir, src) target_dir =
-  scala_function "copy_file_base" [base_dir, src, target_dir];
+  scala_function0 "copy_file_base"
+    [absolute_path base_dir, Path.implode src, absolute_path target_dir];
 
 
 (* tmp files *)
@@ -111,7 +113,7 @@
 
 fun download url =
   with_tmp_file "download" "" (fn path =>
-   (Scala.function "download" (url ^ "\000" ^ Path.implode (File.absolute_path path));
+   (scala_function0 "download" [url, absolute_path path];
     File.read path));
 
 end;