equal
deleted
inserted
replaced
5 */ |
5 */ |
6 |
6 |
7 package isabelle |
7 package isabelle |
8 |
8 |
9 |
9 |
10 import java.util.{Map => JMap} |
10 import java.util.{Map => JMap, HashMap} |
11 import java.io.{File => JFile, IOException} |
11 import java.io.{File => JFile, IOException} |
12 import java.nio.file.{Path => JPath, Files, SimpleFileVisitor, FileVisitResult, |
12 import java.nio.file.{Path => JPath, Files, SimpleFileVisitor, FileVisitResult, |
13 StandardCopyOption, FileSystemException} |
13 StandardCopyOption, FileSystemException} |
14 import java.nio.file.attribute.BasicFileAttributes |
14 import java.nio.file.attribute.BasicFileAttributes |
15 |
15 |
18 |
18 |
19 object Isabelle_System |
19 object Isabelle_System |
20 { |
20 { |
21 /* settings */ |
21 /* settings */ |
22 |
22 |
23 def settings(): JMap[String, String] = isabelle.setup.Environment.settings() |
23 def settings(putenv: List[(String, String)] = Nil): JMap[String, String] = |
|
24 { |
|
25 val env0 = isabelle.setup.Environment.settings() |
|
26 if (putenv.isEmpty) env0 |
|
27 else { |
|
28 val env = new HashMap(env0) |
|
29 for ((a, b) <- putenv) env.put(a, b) |
|
30 env |
|
31 } |
|
32 } |
24 |
33 |
25 def getenv(name: String, env: JMap[String, String] = settings()): String = |
34 def getenv(name: String, env: JMap[String, String] = settings()): String = |
26 Option(env.get(name)).getOrElse("") |
35 Option(env.get(name)).getOrElse("") |
27 |
36 |
28 def getenv_strict(name: String, env: JMap[String, String] = settings()): String = |
37 def getenv_strict(name: String, env: JMap[String, String] = settings()): String = |