File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -214,13 +214,27 @@ pub struct TaskDump {
214
214
}
215
215
216
216
impl TaskDump {
217
+ /// Writes the task dump to a ZIP file
217
218
pub fn write_zip < W : Write + Seek > (
218
219
& self ,
219
220
out : W ,
220
221
) -> Result < ( ) , std:: io:: Error > {
221
222
let mut z = zip:: ZipWriter :: new ( out) ;
222
223
let opt = zip:: write:: FileOptions :: default ( ) ;
223
224
225
+ // Store metadata about the dump format itself in `meta.json`
226
+ //
227
+ // This version number is checked by Humility; remember to update it if
228
+ // you're changing the archive in breaking ways.
229
+ z. start_file ( "meta.json" , opt) ?;
230
+ write ! (
231
+ z,
232
+ r#"\
233
+ {{
234
+ "version": 1,
235
+ }}"#
236
+ ) ?;
237
+
224
238
z. start_file ( "TASK_INDEX" , opt) ?;
225
239
writeln ! ( z, "{}" , self . task_index) ?;
226
240
z. start_file ( "TIMESTAMP" , opt) ?;
You can’t perform that action at this time.
0 commit comments