src/Pure/System/isabelle_system.scala
changeset 72375 e48d93811ed7
parent 72362 5f17bf3709b8
child 72376 04bce3478688
equal deleted inserted replaced
72374:4c8295f2f849 72375:e48d93811ed7
   187     bash("chown " + arg + " " + File.bash_path(path)).check
   187     bash("chown " + arg + " " + File.bash_path(path)).check
   188 
   188 
   189 
   189 
   190   /* directories */
   190   /* directories */
   191 
   191 
   192   def mkdirs(path: Path): Unit =
   192   def make_directory(path: Path): Unit =
   193     if (!path.is_dir) {
   193     if (!path.is_dir) {
   194       bash("perl -e \"use File::Path make_path; make_path('" + File.standard_path(path) + "');\"")
   194       bash("perl -e \"use File::Path make_path; make_path('" + File.standard_path(path) + "');\"")
   195       if (!path.is_dir) error("Failed to create directory: " + quote(File.platform_path(path)))
   195       if (!path.is_dir) error("Failed to create directory: " + quote(File.platform_path(path)))
   196     }
   196     }
   197 
   197 
   202   /* tmp files */
   202   /* tmp files */
   203 
   203 
   204   def isabelle_tmp_prefix(): JFile =
   204   def isabelle_tmp_prefix(): JFile =
   205   {
   205   {
   206     val path = Path.explode("$ISABELLE_TMP_PREFIX")
   206     val path = Path.explode("$ISABELLE_TMP_PREFIX")
   207     path.file.mkdirs  // low-level mkdirs
   207     path.file.mkdirs  // low-level mkdirs to avoid recursion via Isabelle environment
   208     File.platform_file(path)
   208     File.platform_file(path)
   209   }
   209   }
   210 
   210 
   211   def tmp_file(name: String, ext: String = "", base_dir: JFile = isabelle_tmp_prefix()): JFile =
   211   def tmp_file(name: String, ext: String = "", base_dir: JFile = isabelle_tmp_prefix()): JFile =
   212   {
   212   {