src/Pure/System/build.scala
changeset 48280 7d86239986c2
parent 48276 4bd480886813
child 48334 8dff9933e72a
--- a/src/Pure/System/build.scala	Tue Jul 17 21:49:32 2012 +0200
+++ b/src/Pure/System/build.scala	Tue Jul 17 22:34:29 2012 +0200
@@ -56,5 +56,24 @@
 
     rc
   }
+
+
+  /* session information */
+
+  case class Session_Info(
+    val dir: Path,
+    val text: String)
+
+  val ROOT_NAME = "ROOT"
+
+  def find_sessions(): List[Session_Info] =
+  {
+    for {
+      dir <- Isabelle_System.components()
+      root = Isabelle_System.platform_file(dir + Path.basic(ROOT_NAME))
+      if root.isFile
+    }
+    yield Session_Info(dir, Standard_System.read_file(root))
+  }
 }