src/Pure/System/build.scala
changeset 48280 7d86239986c2
parent 48276 4bd480886813
child 48334 8dff9933e72a
     1.1 --- a/src/Pure/System/build.scala	Tue Jul 17 21:49:32 2012 +0200
     1.2 +++ b/src/Pure/System/build.scala	Tue Jul 17 22:34:29 2012 +0200
     1.3 @@ -56,5 +56,24 @@
     1.4  
     1.5      rc
     1.6    }
     1.7 +
     1.8 +
     1.9 +  /* session information */
    1.10 +
    1.11 +  case class Session_Info(
    1.12 +    val dir: Path,
    1.13 +    val text: String)
    1.14 +
    1.15 +  val ROOT_NAME = "ROOT"
    1.16 +
    1.17 +  def find_sessions(): List[Session_Info] =
    1.18 +  {
    1.19 +    for {
    1.20 +      dir <- Isabelle_System.components()
    1.21 +      root = Isabelle_System.platform_file(dir + Path.basic(ROOT_NAME))
    1.22 +      if root.isFile
    1.23 +    }
    1.24 +    yield Session_Info(dir, Standard_System.read_file(root))
    1.25 +  }
    1.26  }
    1.27