src/Pure/Build/store.scala
changeset 79662 dca6ea3b7a01
parent 79661 2a9d8c74eb3c
child 79663 4a299bdb5d61
--- a/src/Pure/Build/store.scala	Sun Feb 18 13:32:44 2024 +0100
+++ b/src/Pure/Build/store.scala	Sun Feb 18 15:03:47 2024 +0100
@@ -15,6 +15,16 @@
     new Store(options, cache)
 
 
+  /* session */
+
+  sealed case class Session(name: String, heap: Option[Path], log_db: Option[Path]) {
+    def defined: Boolean = heap.isDefined || log_db.isDefined
+
+    override def toString: String = name
+  }
+
+
+
   /* session build info */
 
   sealed case class Build_Info(
@@ -263,6 +273,12 @@
   def output_log_gz(name: String): Path = output_dir + log_gz(name)
 
 
+  /* session */
+
+  def get_session(name: String): Store.Session =
+    Store.Session(name, find_heap(name), find_log_db(name))
+
+
   /* heap */
 
   def find_heap(name: String): Option[Path] =