author | wenzelm |
Sat, 26 May 2018 16:52:03 +0200 | |
changeset 68289 | c29fc61fb1b1 |
parent 68288 | d20770229f99 |
child 68290 | f1f5ccc85b25 |
permissions | -rw-r--r-- |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
1 |
/* Title: Pure/Thy/export.scala |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
3 |
|
68102 | 4 |
Manage theory exports: compressed blobs. |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
5 |
*/ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
6 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
7 |
package isabelle |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
8 |
|
68116 | 9 |
|
10 |
import scala.annotation.tailrec |
|
11 |
import scala.util.matching.Regex |
|
12 |
||
13 |
||
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
14 |
object Export |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
15 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
16 |
/* SQL data model */ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
17 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
18 |
object Data |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
19 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
20 |
val session_name = SQL.Column.string("session_name").make_primary_key |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
21 |
val theory_name = SQL.Column.string("theory_name").make_primary_key |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
22 |
val name = SQL.Column.string("name").make_primary_key |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
23 |
val compressed = SQL.Column.bool("compressed") |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
24 |
val body = SQL.Column.bytes("body") |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
25 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
26 |
val table = |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
27 |
SQL.Table("isabelle_exports", List(session_name, theory_name, name, compressed, body)) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
28 |
|
68116 | 29 |
def where_equal(session_name: String, theory_name: String = "", name: String = ""): SQL.Source = |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
30 |
"WHERE " + Data.session_name.equal(session_name) + |
68116 | 31 |
(if (theory_name == "") "" else " AND " + Data.theory_name.equal(theory_name)) + |
32 |
(if (name == "") "" else " AND " + Data.name.equal(name)) |
|
33 |
} |
|
34 |
||
35 |
def read_name(db: SQL.Database, session_name: String, theory_name: String, name: String): Boolean = |
|
36 |
{ |
|
37 |
val select = |
|
38 |
Data.table.select(List(Data.name), Data.where_equal(session_name, theory_name, name)) |
|
39 |
db.using_statement(select)(stmt => stmt.execute_query().next()) |
|
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
40 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
41 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
42 |
def read_names(db: SQL.Database, session_name: String, theory_name: String): List[String] = |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
43 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
44 |
val select = Data.table.select(List(Data.name), Data.where_equal(session_name, theory_name)) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
45 |
db.using_statement(select)(stmt => |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
46 |
stmt.execute_query().iterator(res => res.string(Data.name)).toList) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
47 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
48 |
|
68222 | 49 |
def read_theory_names(db: SQL.Database, session_name: String): List[String] = |
50 |
{ |
|
51 |
val select = |
|
52 |
Data.table.select(List(Data.theory_name), Data.where_equal(session_name), distinct = true) |
|
53 |
db.using_statement(select)(stmt => |
|
54 |
stmt.execute_query().iterator(_.string(Data.theory_name)).toList) |
|
55 |
} |
|
56 |
||
57 |
def read_theory_exports(db: SQL.Database, session_name: String): List[(String, String)] = |
|
68115 | 58 |
{ |
68116 | 59 |
val select = Data.table.select(List(Data.theory_name, Data.name), Data.where_equal(session_name)) |
60 |
db.using_statement(select)(stmt => |
|
61 |
stmt.execute_query().iterator(res => |
|
62 |
(res.string(Data.theory_name), res.string(Data.name))).toList) |
|
68115 | 63 |
} |
64 |
||
68104 | 65 |
def message(msg: String, theory_name: String, name: String): String = |
66 |
msg + " " + quote(name) + " for theory " + quote(theory_name) |
|
67 |
||
68116 | 68 |
def compound_name(a: String, b: String): String = a + ":" + b |
69 |
||
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
70 |
sealed case class Entry( |
68103
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
71 |
session_name: String, |
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
72 |
theory_name: String, |
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
73 |
name: String, |
68167 | 74 |
body: Future[(Boolean, Bytes)]) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
75 |
{ |
68116 | 76 |
override def toString: String = compound_name(theory_name, name) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
77 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
78 |
def write(db: SQL.Database) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
79 |
{ |
68167 | 80 |
val (compressed, bytes) = body.join |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
81 |
db.using_statement(Data.table.insert())(stmt => |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
82 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
83 |
stmt.string(1) = session_name |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
84 |
stmt.string(2) = theory_name |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
85 |
stmt.string(3) = name |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
86 |
stmt.bool(4) = compressed |
68103
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
87 |
stmt.bytes(5) = bytes |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
88 |
stmt.execute() |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
89 |
}) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
90 |
} |
68116 | 91 |
|
68167 | 92 |
def uncompressed(cache: XZ.Cache = XZ.cache()): Bytes = |
93 |
{ |
|
94 |
val (compressed, bytes) = body.join |
|
95 |
if (compressed) bytes.uncompress(cache = cache) else bytes |
|
96 |
} |
|
68171 | 97 |
|
98 |
def uncompressed_yxml(cache: XZ.Cache = XZ.cache()): XML.Body = |
|
99 |
YXML.parse_body(UTF8.decode_permissive(uncompressed(cache = cache))) |
|
68116 | 100 |
} |
101 |
||
102 |
def make_regex(pattern: String): Regex = |
|
103 |
{ |
|
104 |
@tailrec def make(result: List[String], depth: Int, chs: List[Char]): Regex = |
|
105 |
chs match { |
|
106 |
case '*' :: '*' :: rest => make("[^:]*" :: result, depth, rest) |
|
107 |
case '*' :: rest => make("[^:/]*" :: result, depth, rest) |
|
108 |
case '?' :: rest => make("[^:/]" :: result, depth, rest) |
|
109 |
case '\\' :: c :: rest => make(("\\" + c) :: result, depth, rest) |
|
110 |
case '{' :: rest => make("(" :: result, depth + 1, rest) |
|
111 |
case ',' :: rest if depth > 0 => make("|" :: result, depth, rest) |
|
112 |
case '}' :: rest if depth > 0 => make(")" :: result, depth - 1, rest) |
|
113 |
case c :: rest if ".+()".contains(c) => make(("\\" + c) :: result, depth, rest) |
|
114 |
case c :: rest => make(c.toString :: result, depth, rest) |
|
115 |
case Nil => result.reverse.mkString.r |
|
116 |
} |
|
117 |
make(Nil, 0, pattern.toList) |
|
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
118 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
119 |
|
68151 | 120 |
def make_matcher(pattern: String): (String, String) => Boolean = |
121 |
{ |
|
122 |
val regex = make_regex(pattern) |
|
123 |
(theory_name: String, name: String) => |
|
124 |
regex.pattern.matcher(compound_name(theory_name, name)).matches |
|
125 |
} |
|
126 |
||
68166 | 127 |
def make_entry(session_name: String, args: Markup.Export.Args, body: Bytes, |
128 |
cache: XZ.Cache = XZ.cache()): Entry = |
|
68101 | 129 |
{ |
68167 | 130 |
Entry(session_name, args.theory_name, args.name, |
131 |
if (args.compress) Future.fork(body.maybe_compress(cache = cache)) |
|
132 |
else Future.value((false, body))) |
|
68101 | 133 |
} |
134 |
||
68202 | 135 |
def read_entry(db: SQL.Database, session_name: String, theory_name: String, name: String) |
136 |
: Option[Entry] = |
|
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
137 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
138 |
val select = |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
139 |
Data.table.select(List(Data.compressed, Data.body), |
68116 | 140 |
Data.where_equal(session_name, theory_name, name)) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
141 |
db.using_statement(select)(stmt => |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
142 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
143 |
val res = stmt.execute_query() |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
144 |
if (res.next()) { |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
145 |
val compressed = res.bool(Data.compressed) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
146 |
val body = res.bytes(Data.body) |
68202 | 147 |
Some(Entry(session_name, theory_name, name, Future.value(compressed, body))) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
148 |
} |
68202 | 149 |
else None |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
150 |
}) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
151 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
152 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
153 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
154 |
/* database consumer thread */ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
155 |
|
68289 | 156 |
def consumer(db: SQL.Database, cache: XZ.Cache = XZ.cache()): Consumer = new Consumer(db, cache) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
157 |
|
68289 | 158 |
class Consumer private[Export](db: SQL.Database, cache: XZ.Cache) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
159 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
160 |
private val export_errors = Synchronized[List[String]](Nil) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
161 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
162 |
private val consumer = |
68103
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
163 |
Consumer_Thread.fork(name = "export")(consume = (entry: Entry) => |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
164 |
{ |
68103
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
165 |
entry.body.join |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
166 |
db.transaction { |
68115 | 167 |
if (read_name(db, entry.session_name, entry.theory_name, entry.name)) { |
68104 | 168 |
val err = message("Duplicate export", entry.theory_name, entry.name) |
169 |
export_errors.change(errs => err :: errs) |
|
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
170 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
171 |
else entry.write(db) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
172 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
173 |
true |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
174 |
}) |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
175 |
|
68103
c5764b8b2a87
more robust (synchronous) management of Export.Entry: Future.fork happens inside the data structure;
wenzelm
parents:
68102
diff
changeset
|
176 |
def apply(session_name: String, args: Markup.Export.Args, body: Bytes): Unit = |
68289 | 177 |
consumer.send(make_entry(session_name, args, body, cache = cache)) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
178 |
|
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
179 |
def shutdown(close: Boolean = false): List[String] = |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
180 |
{ |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
181 |
consumer.shutdown() |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
182 |
if (close) db.close() |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
183 |
export_errors.value.reverse |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
184 |
} |
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
185 |
} |
68116 | 186 |
|
187 |
||
68288 | 188 |
/* export to file-system */ |
189 |
||
190 |
def export_files( |
|
191 |
store: Sessions.Store, |
|
192 |
session_name: String, |
|
193 |
export_dir: Path, |
|
194 |
progress: Progress = No_Progress, |
|
195 |
export_list: Boolean = false, |
|
196 |
export_pattern: String = "") |
|
197 |
{ |
|
198 |
using(store.open_database(session_name))(db => |
|
199 |
{ |
|
200 |
db.transaction { |
|
201 |
val export_names = read_theory_exports(db, session_name) |
|
202 |
||
203 |
// list |
|
204 |
if (export_list) { |
|
205 |
(for ((theory_name, name) <- export_names) yield compound_name(theory_name, name)). |
|
206 |
sorted.foreach(Output.writeln(_, stdout = true)) |
|
207 |
} |
|
208 |
||
209 |
// export |
|
210 |
if (export_pattern != "") { |
|
211 |
val matcher = make_matcher(export_pattern) |
|
212 |
for { |
|
213 |
(theory_name, name) <- export_names if matcher(theory_name, name) |
|
214 |
entry <- read_entry(db, session_name, theory_name, name) |
|
215 |
} { |
|
216 |
val path = export_dir + Path.basic(theory_name) + Path.explode(name) |
|
217 |
progress.echo("exporting " + path) |
|
218 |
Isabelle_System.mkdirs(path.dir) |
|
68289 | 219 |
Bytes.write(path, entry.uncompressed(cache = store.xz_cache)) |
68288 | 220 |
} |
221 |
} |
|
222 |
} |
|
223 |
}) |
|
224 |
} |
|
225 |
||
226 |
||
68116 | 227 |
/* Isabelle tool wrapper */ |
228 |
||
229 |
val default_export_dir = Path.explode("export") |
|
230 |
||
231 |
val isabelle_tool = Isabelle_Tool("export", "retrieve theory exports", args => |
|
232 |
{ |
|
233 |
/* arguments */ |
|
234 |
||
235 |
var export_dir = default_export_dir |
|
236 |
var dirs: List[Path] = Nil |
|
237 |
var export_list = false |
|
238 |
var no_build = false |
|
239 |
var options = Options.init() |
|
240 |
var system_mode = false |
|
241 |
var export_pattern = "" |
|
242 |
||
243 |
val getopts = Getopts(""" |
|
244 |
Usage: isabelle export [OPTIONS] SESSION |
|
245 |
||
246 |
Options are: |
|
247 |
-D DIR target directory for exported files (default: """ + default_export_dir + """) |
|
248 |
-d DIR include session directory |
|
249 |
-l list exports |
|
250 |
-n no build of session |
|
251 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
|
252 |
-s system build mode for session image |
|
253 |
-x PATTERN extract files matching pattern (e.g. "*:**" for all) |
|
254 |
||
255 |
List or export theory exports for SESSION: named blobs produced by |
|
256 |
isabelle build. Option -l or -x is required. |
|
257 |
||
258 |
The PATTERN language resembles glob patterns in the shell, with ? and * |
|
259 |
(both excluding ":" and "/"), ** (excluding ":"), and [abc] or [^abc], |
|
260 |
and variants {pattern1,pattern2,pattern3}. |
|
261 |
""", |
|
262 |
"D:" -> (arg => export_dir = Path.explode(arg)), |
|
263 |
"d:" -> (arg => dirs = dirs ::: List(Path.explode(arg))), |
|
264 |
"l" -> (_ => export_list = true), |
|
265 |
"n" -> (_ => no_build = true), |
|
266 |
"o:" -> (arg => options = options + arg), |
|
267 |
"s" -> (_ => system_mode = true), |
|
268 |
"x:" -> (arg => export_pattern = arg)) |
|
269 |
||
270 |
val more_args = getopts(args) |
|
271 |
val session_name = |
|
272 |
more_args match { |
|
273 |
case List(session_name) if export_list || export_pattern != "" => session_name |
|
274 |
case _ => getopts.usage() |
|
275 |
} |
|
276 |
||
277 |
||
278 |
/* build */ |
|
279 |
||
280 |
val progress = new Console_Progress() |
|
281 |
||
282 |
if (!no_build && |
|
283 |
!Build.build(options, no_build = true, dirs = dirs, system_mode = system_mode, |
|
284 |
sessions = List(session_name)).ok) |
|
285 |
{ |
|
286 |
progress.echo("Build started for Isabelle/" + session_name + " ...") |
|
287 |
progress.interrupt_handler { |
|
288 |
val res = |
|
289 |
Build.build(options, progress = progress, dirs = dirs, system_mode = system_mode, |
|
290 |
sessions = List(session_name)) |
|
291 |
if (!res.ok) sys.exit(res.rc) |
|
292 |
} |
|
293 |
} |
|
294 |
||
295 |
||
68288 | 296 |
/* export files */ |
68116 | 297 |
|
68209 | 298 |
val store = Sessions.store(options, system_mode) |
68288 | 299 |
export_files(store, session_name, export_dir, progress = progress, |
300 |
export_list = export_list, export_pattern = export_pattern) |
|
68116 | 301 |
}) |
68092
888d35a19866
store exports in session database, with asynchronous / parallel compression;
wenzelm
parents:
diff
changeset
|
302 |
} |