summaryrefslogtreecommitdiff
path: root/reference/ostree-In-memory-modifiable-filesystem-tree.html
blob: f06af255856f3f9e17d47e10b29a15dc04203780 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>In-memory modifiable filesystem tree: OSTree API references</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="OSTree API references">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="ostree-OstreeRepo.html" title="OstreeRepo: Content-addressed object store">
<link rel="next" href="ostree-Root-partition-mount-point.html" title="Root partition mount point">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#ostree-In-memory-modifiable-filesystem-tree.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ostree-OstreeRepo.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ostree-Root-partition-mount-point.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ostree-In-memory-modifiable-filesystem-tree"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ostree-In-memory-modifiable-filesystem-tree.top_of_page"></a>In-memory modifiable filesystem tree</span></h2>
<p>In-memory modifiable filesystem tree — Modifiable filesystem tree</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ostree-In-memory-modifiable-filesystem-tree.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new" title="ostree_mutable_tree_new ()">ostree_mutable_tree_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new-from-commit" title="ostree_mutable_tree_new_from_commit ()">ostree_mutable_tree_new_from_commit</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-new-from-checksum" title="ostree_mutable_tree_new_from_checksum ()">ostree_mutable_tree_new_from_checksum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-check-error" title="ostree_mutable_tree_check_error ()">ostree_mutable_tree_check_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-metadata-checksum" title="ostree_mutable_tree_set_metadata_checksum ()">ostree_mutable_tree_set_metadata_checksum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-metadata-checksum" title="ostree_mutable_tree_get_metadata_checksum ()">ostree_mutable_tree_get_metadata_checksum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-set-contents-checksum" title="ostree_mutable_tree_set_contents_checksum ()">ostree_mutable_tree_set_contents_checksum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-contents-checksum" title="ostree_mutable_tree_get_contents_checksum ()">ostree_mutable_tree_get_contents_checksum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-replace-file" title="ostree_mutable_tree_replace_file ()">ostree_mutable_tree_replace_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-remove" title="ostree_mutable_tree_remove ()">ostree_mutable_tree_remove</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-dir" title="ostree_mutable_tree_ensure_dir ()">ostree_mutable_tree_ensure_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-lookup" title="ostree_mutable_tree_lookup ()">ostree_mutable_tree_lookup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-ensure-parent-dirs" title="ostree_mutable_tree_ensure_parent_dirs ()">ostree_mutable_tree_ensure_parent_dirs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-walk" title="ostree_mutable_tree_walk ()">ostree_mutable_tree_walk</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GHashTable</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-subdirs" title="ostree_mutable_tree_get_subdirs ()">ostree_mutable_tree_get_subdirs</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GHashTable</span> *
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-get-files" title="ostree_mutable_tree_get_files ()">ostree_mutable_tree_get_files</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#ostree-mutable-tree-fill-empty-from-dirtree" title="ostree_mutable_tree_fill_empty_from_dirtree ()">ostree_mutable_tree_fill_empty_from_dirtree</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ostree-In-memory-modifiable-filesystem-tree.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree">OstreeMutableTree</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ostree-In-memory-modifiable-filesystem-tree.description"></a><h2>Description</h2>
<p>In order to commit content into an <a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a>, it must first be
imported into an <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a>.  There are several high level
APIs to create an initiable <a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> from a physical
filesystem directory, but they may also be computed
programmatically.</p>
</div>
<div class="refsect1">
<a name="ostree-In-memory-modifiable-filesystem-tree.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ostree-mutable-tree-new"></a><h3>ostree_mutable_tree_new ()</h3>
<pre class="programlisting"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
ostree_mutable_tree_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="refsect3">
<a name="ostree-mutable-tree-new.returns"></a><h4>Returns</h4>
<p>A new tree. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-new-from-commit"></a><h3>ostree_mutable_tree_new_from_commit ()</h3>
<pre class="programlisting"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
ostree_mutable_tree_new_from_commit (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
                                     <em class="parameter"><code>const <span class="type">char</span> *rev</code></em>,
                                     <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Creates a new OstreeMutableTree with the contents taken from the given commit.
The data will be loaded from the repo lazily as needed.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-new-from-commit.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>repo</p></td>
<td class="parameter_description"><p>The repo which contains the objects refered by the checksums.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>rev</p></td>
<td class="parameter_description"><p>ref or SHA-256 checksum</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-mutable-tree-new-from-commit.returns"></a><h4>Returns</h4>
<p>A new tree. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
<p class="since">Since: 2021.5</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-new-from-checksum"></a><h3>ostree_mutable_tree_new_from_checksum ()</h3>
<pre class="programlisting"><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="returnvalue">OstreeMutableTree</span></a> *
ostree_mutable_tree_new_from_checksum (<em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
                                       <em class="parameter"><code>const <span class="type">char</span> *contents_checksum</code></em>,
                                       <em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>);</pre>
<p>Creates a new OstreeMutableTree with the contents taken from the given repo
and checksums.  The data will be loaded from the repo lazily as needed.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-new-from-checksum.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>repo</p></td>
<td class="parameter_description"><p>The repo which contains the objects refered by the checksums.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>contents_checksum</p></td>
<td class="parameter_description"><p>dirtree checksum</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>metadata_checksum</p></td>
<td class="parameter_description"><p>dirmeta checksum</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-mutable-tree-new-from-checksum.returns"></a><h4>Returns</h4>
<p>A new tree. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></p>
</div>
<p class="since">Since: 2018.7</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-check-error"></a><h3>ostree_mutable_tree_check_error ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_check_error (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                 <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>In some cases, a tree may be in a "lazy" state that loads
data in the background; if an error occurred during a non-throwing
API call, it will have been cached.  This function checks for a
cached error.  The tree remains in error state.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-check-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Tree</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-mutable-tree-check-error.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> on success</p>
</div>
<p class="since">Since: 2018.7</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-set-metadata-checksum"></a><h3>ostree_mutable_tree_set_metadata_checksum ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_mutable_tree_set_metadata_checksum
                               (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-get-metadata-checksum"></a><h3>ostree_mutable_tree_get_metadata_checksum ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
ostree_mutable_tree_get_metadata_checksum
                               (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-set-contents-checksum"></a><h3>ostree_mutable_tree_set_contents_checksum ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
ostree_mutable_tree_set_contents_checksum
                               (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-get-contents-checksum"></a><h3>ostree_mutable_tree_get_contents_checksum ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
ostree_mutable_tree_get_contents_checksum
                               (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-replace-file"></a><h3>ostree_mutable_tree_replace_file ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_replace_file (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                  <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                  <em class="parameter"><code>const <span class="type">char</span> *checksum</code></em>,
                                  <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-remove"></a><h3>ostree_mutable_tree_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_remove (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                            <em class="parameter"><code><span class="type">gboolean</span> allow_noent</code></em>,
                            <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Remove the file or subdirectory named <em class="parameter"><code>name</code></em>
 from the mutable tree <em class="parameter"><code>self</code></em>
.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-remove.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Tree</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Name of file or subdirectory to remove</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>allow_noent</p></td>
<td class="parameter_description"><p>If <em class="parameter"><code>FALSE</code></em>
, an error will be thrown if <em class="parameter"><code>name</code></em>
does not exist in the tree</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2018.9</p>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-ensure-dir"></a><h3>ostree_mutable_tree_ensure_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_ensure_dir (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                                <em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
                                <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Returns the subdirectory of self with filename <em class="parameter"><code>name</code></em>
, creating an empty one
it if it doesn't exist.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-ensure-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Tree</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Name of subdirectory of self to retrieve/creates</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_subdir</p></td>
<td class="parameter_description"><p>the subdirectory. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-lookup"></a><h3>ostree_mutable_tree_lookup ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_lookup (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
                            <em class="parameter"><code><span class="type">char</span> **out_file_checksum</code></em>,
                            <em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
                            <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Lookup <em class="parameter"><code>name</code></em>
 and returns <em class="parameter"><code>out_file_checksum</code></em>
 or <em class="parameter"><code>out_subdir</code></em>
 depending on its
file type.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-lookup.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Tree</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_file_checksum</p></td>
<td class="parameter_description"><p>checksum. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out_subdir</p></td>
<td class="parameter_description"><p>subdirectory. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/nullable"><span class="acronym">nullable</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="ostree-mutable-tree-lookup.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> on success and either <em class="parameter"><code>out_file_checksum</code></em>
or <em class="parameter"><code>out_subdir</code></em>
are
filled, <code class="literal">FALSE</code> otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-ensure-parent-dirs"></a><h3>ostree_mutable_tree_ensure_parent_dirs ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_ensure_parent_dirs
                               (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                <em class="parameter"><code><span class="type">GPtrArray</span> *split_path</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>,
                                <em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_parent</code></em>,
                                <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Create all parent trees necessary for the given <em class="parameter"><code>split_path</code></em>
 to
exist.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-ensure-parent-dirs.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Tree</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>split_path</p></td>
<td class="parameter_description"><p>File path components. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>metadata_checksum</p></td>
<td class="parameter_description"><p>SHA256 checksum for metadata</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_parent</p></td>
<td class="parameter_description"><p>The parent tree. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/optional"><span class="acronym">optional</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <span class="type">GError</span></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-walk"></a><h3>ostree_mutable_tree_walk ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_walk (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                          <em class="parameter"><code><span class="type">GPtrArray</span> *split_path</code></em>,
                          <em class="parameter"><code><span class="type">guint</span> start</code></em>,
                          <em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> **out_subdir</code></em>,
                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Traverse <em class="parameter"><code>start</code></em>
 number of elements starting from <em class="parameter"><code>split_path</code></em>
; the
child will be returned in <em class="parameter"><code>out_subdir</code></em>
.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-walk.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>Tree</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>split_path</p></td>
<td class="parameter_description"><p>Split pathname. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>start</p></td>
<td class="parameter_description"><p>Descend from this number of elements in <em class="parameter"><code>split_path</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out_subdir</p></td>
<td class="parameter_description"><p>Target parent. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Error</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-get-subdirs"></a><h3>ostree_mutable_tree_get_subdirs ()</h3>
<pre class="programlisting"><span class="returnvalue">GHashTable</span> *
ostree_mutable_tree_get_subdirs (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-mutable-tree-get-subdirs.returns"></a><h4>Returns</h4>
<p>All children directories. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8 OstreeMutableTree]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-get-files"></a><h3>ostree_mutable_tree_get_files ()</h3>
<pre class="programlisting"><span class="returnvalue">GHashTable</span> *
ostree_mutable_tree_get_files (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>);</pre>
<div class="refsect3">
<a name="ostree-mutable-tree-get-files.returns"></a><h4>Returns</h4>
<p>All children files (the value is a checksum). </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>][<a href="http://foldoc.org/element-type"><span class="acronym">element-type</span></a> utf8 utf8]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ostree-mutable-tree-fill-empty-from-dirtree"></a><h3>ostree_mutable_tree_fill_empty_from_dirtree ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
ostree_mutable_tree_fill_empty_from_dirtree
                               (<em class="parameter"><code><a class="link" href="ostree-In-memory-modifiable-filesystem-tree.html#OstreeMutableTree" title="OstreeMutableTree"><span class="type">OstreeMutableTree</span></a> *self</code></em>,
                                <em class="parameter"><code><a class="link" href="ostree-OstreeRepo.html#OstreeRepo" title="OstreeRepo"><span class="type">OstreeRepo</span></a> *repo</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *contents_checksum</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *metadata_checksum</code></em>);</pre>
<p>Merges <em class="parameter"><code>self</code></em>
 with the tree given by <em class="parameter"><code>contents_checksum</code></em>
 and
<em class="parameter"><code>metadata_checksum</code></em>
, but only if it's possible without writing new objects to
the <em class="parameter"><code>repo</code></em>
.  We can do this if either <em class="parameter"><code>self</code></em>
 is empty, the tree given by
<em class="parameter"><code>contents_checksum</code></em>
 is empty or if both trees already have the same
<em class="parameter"><code>contents_checksum</code></em>
.</p>
<div class="refsect3">
<a name="ostree-mutable-tree-fill-empty-from-dirtree.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>TRUE</code></em>
if merge was successful, <em class="parameter"><code>FALSE</code></em>
if it was not possible.</p>
<p>This function enables optimisations when composing trees.  The provided
checksums are not loaded or checked when this function is called.  Instead
the contents will be loaded only when needed.</p>
</div>
<p class="since">Since: 2018.7</p>
</div>
</div>
<div class="refsect1">
<a name="ostree-In-memory-modifiable-filesystem-tree.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="OstreeMutableTree"></a><h3>OstreeMutableTree</h3>
<pre class="programlisting">typedef struct OstreeMutableTree OstreeMutableTree;
</pre>
<p>Private instance structure.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>