Welcome to mirror list, hosted at ThFree Co, Russian Federation.

namespacellfio__v2__xxx_1_1algorithm.html - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8120c74e2150c7aefc5b04fb38d9a1563d4c4e36 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LLFIO: llfio_v2_xxx::algorithm Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LLFIO
   &#160;<span id="projectnumber">v2.00 late beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('namespacellfio__v2__xxx_1_1algorithm.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">llfio_v2_xxx::algorithm Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Collection of file system based algorithms.  
<a href="namespacellfio__v2__xxx_1_1algorithm.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacellfio__v2__xxx_1_1algorithm_1_1impl"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm_1_1impl.html">impl</a></td></tr>
<tr class="memdesc:namespacellfio__v2__xxx_1_1algorithm_1_1impl"><td class="mdescLeft">&#160;</td><td class="mdescRight">Does not exist in the actual source code, purely here to workaround doxygen limitations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespacellfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex.html">shared_fs_mutex</a></td></tr>
<tr class="memdesc:namespacellfio__v2__xxx_1_1algorithm_1_1shared__fs__mutex"><td class="mdescLeft">&#160;</td><td class="mdescRight">Algorithms for protecting a shared filing system resource from racy modification. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1cached__parent__handle__adapter.html">cached_parent_handle_adapter</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adapts any <code>construct()</code>-able implementation to cache its parent directory handle in a process wide cache.  <a href="classllfio__v2__xxx_1_1algorithm_1_1cached__parent__handle__adapter.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1combining__handle__adapter.html">combining_handle_adapter</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A handle combining the data from one or two other handles.  <a href="classllfio__v2__xxx_1_1algorithm_1_1combining__handle__adapter.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1compare__visitor.html">compare_visitor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A visitor for the filesystem traversal and comparison algorithm.  <a href="structllfio__v2__xxx_1_1algorithm_1_1compare__visitor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1contents__visitor.html">contents_visitor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A visitor for the filesystem contents algorithm.  <a href="structllfio__v2__xxx_1_1algorithm_1_1contents__visitor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1difference__item.html">difference_item</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1reduce__visitor.html">reduce_visitor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A visitor for the filesystem traversal and reduction algorithm.  <a href="structllfio__v2__xxx_1_1algorithm_1_1reduce__visitor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1summarize__visitor.html">summarize_visitor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A visitor for the filesystem traversal and summary algorithm.  <a href="structllfio__v2__xxx_1_1algorithm_1_1summarize__visitor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traversal__summary.html">traversal_summary</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A summary of a directory tree.  <a href="structllfio__v2__xxx_1_1algorithm_1_1traversal__summary.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traverse__visitor.html">traverse_visitor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A visitor for the filesystem traversal algorithm.  <a href="structllfio__v2__xxx_1_1algorithm_1_1traverse__visitor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a constant time capacity expanding move-only STL vector. Requires <code>T</code> to be trivially copyable.  <a href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a27450e894b5dab6c18a01350670fa0dc"><td class="memTemplParams" colspan="2">template&lt;class Target , class Source &gt; </td></tr>
<tr class="memitem:a27450e894b5dab6c18a01350670fa0dc"><td class="memTemplItemLeft" align="right" valign="top">using&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a27450e894b5dab6c18a01350670fa0dc">xor_handle_adapter</a> = <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1combining__handle__adapter.html">combining_handle_adapter</a>&lt; detail::xor_handle_adapter_op, Target, Source &gt;</td></tr>
<tr class="memdesc:a27450e894b5dab6c18a01350670fa0dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">A handle combining the data from two other handles using XOR.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#a27450e894b5dab6c18a01350670fa0dc">More...</a><br /></td></tr>
<tr class="separator:a27450e894b5dab6c18a01350670fa0dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3c661d6cba0da25fe9e1211ede1fd004"><td class="memItemLeft" align="right" valign="top">result&lt; file_handle::extent_type &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a3c661d6cba0da25fe9e1211ede1fd004">clone_or_copy</a> (<a class="el" href="classllfio__v2__xxx_1_1file__handle.html">file_handle</a> &amp;src, const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;destdir, <a class="el" href="classllfio__v2__xxx_1_1path__view.html">path_view</a> destleaf={}, bool preserve_timestamps=true, bool force_copy_now=false, <a class="el" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42">file_handle::creation</a> creation=<a class="el" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42af7cf95e0f43dc8f79e39ae628c85a11d">file_handle::creation::always_new</a>, <a class="el" href="structllfio__v2__xxx_1_1deadline.html">deadline</a> d={}) noexcept</td></tr>
<tr class="memdesc:a3c661d6cba0da25fe9e1211ede1fd004"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone or copy the extents of the filesystem entity identified by <code>src</code> to <code>destdir</code> optionally renamed to <code>destleaf</code>.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#a3c661d6cba0da25fe9e1211ede1fd004">More...</a><br /></td></tr>
<tr class="separator:a3c661d6cba0da25fe9e1211ede1fd004"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afae251fc3bfb7280b47b6135e2f6c7e2"><td class="memItemLeft" align="right" valign="top">result&lt; <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1contents__visitor_1_1contents__type.html">contents_visitor::contents_type</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#afae251fc3bfb7280b47b6135e2f6c7e2">contents</a> (const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;dirh, <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1contents__visitor.html">contents_visitor</a> *visitor=nullptr, size_t threads=0, bool force_slow_path=false) noexcept</td></tr>
<tr class="memdesc:afae251fc3bfb7280b47b6135e2f6c7e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the contents of everything within and under <code>dirh</code>. What is returned is unordered.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#afae251fc3bfb7280b47b6135e2f6c7e2">More...</a><br /></td></tr>
<tr class="separator:afae251fc3bfb7280b47b6135e2f6c7e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6165d32704ff21b4aed3046f11b31cb0"><td class="memItemLeft" align="right" valign="top">result&lt; <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traversal__summary.html">traversal_summary</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a6165d32704ff21b4aed3046f11b31cb0">summarize</a> (const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;dirh, stat_t::want want=<a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traversal__summary.html#a8904eee9435edf3562642294046c634e">traversal_summary::default_metadata</a>(), <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1summarize__visitor.html">summarize_visitor</a> *visitor=nullptr, size_t threads=0, bool force_slow_path=false) noexcept</td></tr>
<tr class="memdesc:a6165d32704ff21b4aed3046f11b31cb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Summarise the directory identified <code>dirh</code>, and everything therein.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#a6165d32704ff21b4aed3046f11b31cb0">More...</a><br /></td></tr>
<tr class="separator:a6165d32704ff21b4aed3046f11b31cb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05594f7c8ae275fa65b2acd57cc9b8ac"><td class="memItemLeft" align="right" valign="top">result&lt; size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a05594f7c8ae275fa65b2acd57cc9b8ac">reduce</a> (<a class="el" href="classllfio__v2__xxx_1_1directory__handle.html">directory_handle</a> &amp;&amp;dirh, <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1reduce__visitor.html">reduce_visitor</a> *visitor=nullptr, size_t threads=0, bool force_slow_path=false) noexcept</td></tr>
<tr class="memdesc:a05594f7c8ae275fa65b2acd57cc9b8ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reduce the directory identified <code>dirh</code>, and everything therein, to the null set.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#a05594f7c8ae275fa65b2acd57cc9b8ac">More...</a><br /></td></tr>
<tr class="separator:a05594f7c8ae275fa65b2acd57cc9b8ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae068bc16598189811d0ce2b3530f1de7"><td class="memItemLeft" align="right" valign="top">result&lt; size_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#ae068bc16598189811d0ce2b3530f1de7">traverse</a> (const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;dirh, <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traverse__visitor.html">traverse_visitor</a> *visitor, size_t threads=0, void *data=nullptr, bool force_slow_path=false) noexcept</td></tr>
<tr class="memdesc:ae068bc16598189811d0ce2b3530f1de7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Traverse everything within and under <code>dirh</code>.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#ae068bc16598189811d0ce2b3530f1de7">More...</a><br /></td></tr>
<tr class="separator:ae068bc16598189811d0ce2b3530f1de7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e8566ac7a5eeb0c14cf2387dfb8c1a1"><td class="memTemplParams" colspan="2"><a id="a6e8566ac7a5eeb0c14cf2387dfb8c1a1"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:a6e8566ac7a5eeb0c14cf2387dfb8c1a1"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a6e8566ac7a5eeb0c14cf2387dfb8c1a1">operator==</a> (const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b)</td></tr>
<tr class="memdesc:a6e8566ac7a5eeb0c14cf2387dfb8c1a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare. <br /></td></tr>
<tr class="separator:a6e8566ac7a5eeb0c14cf2387dfb8c1a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ef00d65394827ceb91597dda1f496f9"><td class="memTemplParams" colspan="2"><a id="a7ef00d65394827ceb91597dda1f496f9"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:a7ef00d65394827ceb91597dda1f496f9"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a7ef00d65394827ceb91597dda1f496f9">operator!=</a> (const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b)</td></tr>
<tr class="memdesc:a7ef00d65394827ceb91597dda1f496f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare. <br /></td></tr>
<tr class="separator:a7ef00d65394827ceb91597dda1f496f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48db273f73f86955938b99faeef6e113"><td class="memTemplParams" colspan="2"><a id="a48db273f73f86955938b99faeef6e113"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:a48db273f73f86955938b99faeef6e113"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a48db273f73f86955938b99faeef6e113">operator&lt;</a> (const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b)</td></tr>
<tr class="memdesc:a48db273f73f86955938b99faeef6e113"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare. <br /></td></tr>
<tr class="separator:a48db273f73f86955938b99faeef6e113"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a993ddc5c77998a907582247107f6e6c5"><td class="memTemplParams" colspan="2"><a id="a993ddc5c77998a907582247107f6e6c5"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:a993ddc5c77998a907582247107f6e6c5"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a993ddc5c77998a907582247107f6e6c5">operator&lt;=</a> (const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b)</td></tr>
<tr class="memdesc:a993ddc5c77998a907582247107f6e6c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare. <br /></td></tr>
<tr class="separator:a993ddc5c77998a907582247107f6e6c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ba09ef10dc88c605edf40669322d8d4"><td class="memTemplParams" colspan="2"><a id="a4ba09ef10dc88c605edf40669322d8d4"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:a4ba09ef10dc88c605edf40669322d8d4"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a4ba09ef10dc88c605edf40669322d8d4">operator&gt;</a> (const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b)</td></tr>
<tr class="memdesc:a4ba09ef10dc88c605edf40669322d8d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare. <br /></td></tr>
<tr class="separator:a4ba09ef10dc88c605edf40669322d8d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade7571062c3e19cb6622bd2e411130ab"><td class="memTemplParams" colspan="2"><a id="ade7571062c3e19cb6622bd2e411130ab"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:ade7571062c3e19cb6622bd2e411130ab"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#ade7571062c3e19cb6622bd2e411130ab">operator&gt;=</a> (const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, const <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b)</td></tr>
<tr class="memdesc:ade7571062c3e19cb6622bd2e411130ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare. <br /></td></tr>
<tr class="separator:ade7571062c3e19cb6622bd2e411130ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0973243c4b58d53d6f11ce5a2535a8c"><td class="memTemplParams" colspan="2"><a id="ae0973243c4b58d53d6f11ce5a2535a8c"></a>
template&lt;class T &gt; </td></tr>
<tr class="memitem:ae0973243c4b58d53d6f11ce5a2535a8c"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#ae0973243c4b58d53d6f11ce5a2535a8c">swap</a> (<a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;a, <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1trivial__vector.html">trivial_vector</a>&lt; T &gt; &amp;b) noexcept</td></tr>
<tr class="memdesc:ae0973243c4b58d53d6f11ce5a2535a8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap. <br /></td></tr>
<tr class="separator:ae0973243c4b58d53d6f11ce5a2535a8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e474a5af3258fc971c71d057c8fb0bb"><td class="memTemplParams" colspan="2">template&lt;class T , class... Args&gt; </td></tr>
<tr class="memitem:a0e474a5af3258fc971c71d057c8fb0bb"><td class="memTemplItemLeft" align="right" valign="top">result&lt; <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1cached__parent__handle__adapter.html">cached_parent_handle_adapter</a>&lt; T &gt; &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a0e474a5af3258fc971c71d057c8fb0bb">cache_parent</a> (Args &amp;&amp;... args) noexcept</td></tr>
<tr class="memdesc:a0e474a5af3258fc971c71d057c8fb0bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <code>T</code> adapted into a parent handle caching implementation.  <a href="namespacellfio__v2__xxx_1_1algorithm.html#a0e474a5af3258fc971c71d057c8fb0bb">More...</a><br /></td></tr>
<tr class="separator:a0e474a5af3258fc971c71d057c8fb0bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Collection of file system based algorithms. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a27450e894b5dab6c18a01350670fa0dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27450e894b5dab6c18a01350670fa0dc">&#9670;&nbsp;</a></span>xor_handle_adapter</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Target , class Source &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html#a27450e894b5dab6c18a01350670fa0dc">llfio_v2_xxx::algorithm::xor_handle_adapter</a> = typedef <a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1combining__handle__adapter.html">combining_handle_adapter</a>&lt;detail::xor_handle_adapter_op, Target, Source&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A handle combining the data from two other handles using XOR. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Target</td><td>The type of the target handle. This is the one written to during any writes i.e. the input and second handle are XORed together and written to the first handle. </td></tr>
    <tr><td class="paramname">Source</td><td>The type of the second handle with which to XOR the target handle.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>This class is still in development, do not use. </dd></dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a0e474a5af3258fc971c71d057c8fb0bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e474a5af3258fc971c71d057c8fb0bb">&#9670;&nbsp;</a></span>cache_parent()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T , class... Args&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">result&lt;<a class="el" href="classllfio__v2__xxx_1_1algorithm_1_1cached__parent__handle__adapter.html">cached_parent_handle_adapter</a>&lt;T&gt; &gt; llfio_v2_xxx::algorithm::cache_parent </td>
          <td>(</td>
          <td class="paramtype">Args &amp;&amp;...&#160;</td>
          <td class="paramname"><em>args</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Constructs a <code>T</code> adapted into a parent handle caching implementation. </p>
<p>This function works via the <code>construct&lt;T&gt;()</code> free function framework for which your <code>handle</code> implementation must have registered its construction details. </p>
<div class="fragment"><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  {</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    construct&lt;T&gt; constructor{std::forward&lt;Args&gt;(args)...};</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    OUTCOME_TRY(<span class="keyword">auto</span> &amp;&amp;h, constructor());</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="keywordflow">try</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;      <span class="keywordflow">return</span> cached_parent_handle_adapter&lt;T&gt;(std::move(h), constructor.base, constructor._path);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    }</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    <span class="keywordflow">catch</span>(...)</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    {</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;      <span class="keywordflow">return</span> error_from_exception();</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    }</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a3c661d6cba0da25fe9e1211ede1fd004"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c661d6cba0da25fe9e1211ede1fd004">&#9670;&nbsp;</a></span>clone_or_copy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">result&lt;file_handle::extent_type&gt; llfio_v2_xxx::algorithm::clone_or_copy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1file__handle.html">file_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>destdir</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1path__view.html">path_view</a>&#160;</td>
          <td class="paramname"><em>destleaf</em> = <code>{}</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>preserve_timestamps</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_copy_now</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42">file_handle::creation</a>&#160;</td>
          <td class="paramname"><em>creation</em> = <code><a class="el" href="classllfio__v2__xxx_1_1handle.html#af0b352d0f273ba6fa70c178b2c2fee42af7cf95e0f43dc8f79e39ae628c85a11d">file_handle::creation::always_new</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structllfio__v2__xxx_1_1deadline.html">deadline</a>&#160;</td>
          <td class="paramname"><em>d</em> = <code>{}</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clone or copy the extents of the filesystem entity identified by <code>src</code> to <code>destdir</code> optionally renamed to <code>destleaf</code>. </p>
<dl class="section return"><dt>Returns</dt><dd>The number of bytes cloned or copied. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>The file to clone or copy. </td></tr>
    <tr><td class="paramname">destdir</td><td>The base to lookup <code>destleaf</code> within. </td></tr>
    <tr><td class="paramname">destleaf</td><td>The leafname to use. If empty, use the same leafname as <code>src</code> currently has. </td></tr>
    <tr><td class="paramname">preserve_timestamps</td><td>Use <code>stat_t::stamp()</code> to preserve as much metadata from the original to the clone/copy as possible. </td></tr>
    <tr><td class="paramname">force_copy_now</td><td>Parameter to pass to <code>file_handle::clone_extents()</code> to force extents to be copied now, not copy-on-write lazily later. </td></tr>
    <tr><td class="paramname">creation</td><td>How to create the destination file handle. NOTE that if this is NOT <code>always_new</code>, if the destination has identical maximum extent and last modified timestamp (and permissions on POSIX) to the source, it is NOT copied, and zero is returned. </td></tr>
    <tr><td class="paramname">d</td><td>Deadline by which to complete the operation.</td></tr>
  </table>
  </dd>
</dl>
<p>Firstly, a <code>file_handle</code> is constructed at the destination using <code>creation</code>, which defaults to always creating a new inode. The caching used for the destination handle is replicated from the source handle &ndash; be aware that not caching metadata is expensive.</p>
<p>Next <code>file_handle::clone_extents()</code> with <code>emulate_if_unsupported = false</code> is called on the whole file content. If extent cloning is supported, this will be very fast and not consume new disk space (note: except on networked filesystems). If the source file is sparsely allocated, the destination will have identical sparse allocation.</p>
<p>If the previous operation did not succeed, the disk free space is checked using <code>statfs_t</code>, and if the copy would exceed current disk free space, the destination file is unlinked and an error code comparing equal to <code>errc::no_space_on_device</code> is returned.</p>
<p>Next, <code>file_handle::clone_extents()</code> with <code>emulate_if_unsupported = true</code> is called on the whole file content. This copies only the allocated extents in blocks sized whatever is the large page size on this platform (2Mb on x64).</p>
<p>Finally, if <code>preserve_timestamps</code> is true, the destination file handle is restamped with the metadata from the source file handle just before the destination file handle is closed. </p>

</div>
</div>
<a id="afae251fc3bfb7280b47b6135e2f6c7e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afae251fc3bfb7280b47b6135e2f6c7e2">&#9670;&nbsp;</a></span>contents()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">result&lt;<a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1contents__visitor_1_1contents__type.html">contents_visitor::contents_type</a>&gt; llfio_v2_xxx::algorithm::contents </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>dirh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1contents__visitor.html">contents_visitor</a> *&#160;</td>
          <td class="paramname"><em>visitor</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>threads</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_slow_path</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the contents of everything within and under <code>dirh</code>. What is returned is unordered. </p>
<p>This is a very thin veneer over <code>traverse()</code> which came out of the fact that I kept writing "get me the contents" traversal visitors again and again, so eventually I just wrote a library edition. Its only "clever" bit is that it stores the contents in thread local storage, and merges the contents afterwards.</p>
<p>It is race free to concurrent relocations of <code>dirh</code>. It is entirely implemented in header-only code, as it is very simple. </p>
<div class="fragment"><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;  {</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    contents_visitor default_visitor;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    <span class="keywordflow">if</span>(visitor == <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;    {</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;      visitor = &amp;default_visitor;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    }</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    contents_visitor::_state_type state(dirh);</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    OUTCOME_TRY(<span class="keyword">auto</span> &amp;&amp;dirhpath, dirh.current_path());</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    state.rootdirpathlen.store(dirhpath.native().size() + 1, std::memory_order_relaxed);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    OUTCOME_TRY(<a class="code" href="namespacellfio__v2__xxx_1_1algorithm.html#ae068bc16598189811d0ce2b3530f1de7">traverse</a>(dirh, visitor, threads, &amp;state, force_slow_path));</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordflow">return</span> {std::move(state.contents)};</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a05594f7c8ae275fa65b2acd57cc9b8ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05594f7c8ae275fa65b2acd57cc9b8ac">&#9670;&nbsp;</a></span>reduce()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">result&lt;size_t&gt; llfio_v2_xxx::algorithm::reduce </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classllfio__v2__xxx_1_1directory__handle.html">directory_handle</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>dirh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1reduce__visitor.html">reduce_visitor</a> *&#160;</td>
          <td class="paramname"><em>visitor</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>threads</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_slow_path</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reduce the directory identified <code>dirh</code>, and everything therein, to the null set. </p>
<p>You might be surprised to learn that most directory tree removal implementations are of poor quality, not leveraging the filesystem facilities that are available, not handling concurrent modification of the filesystem correctly, having poor performance, or failing to handle not uncommon corner cases. This implementation is considerably better quality, indeed it is to my knowledge the highest quality possible on at least Linux and Microsoft Windows.</p>
<p>The algorithm is as follows:</p>
<ol type="1">
<li>Attempt to rename <code>dirh</code> to a uniquely named directory. If successful, this causes concurrent users to no longer see the directory tree. It also usefully detects if permissions problems would prevent whole directory tree removal. Note that on Windows, if any process has a handle open to anything inside the directory tree, it is usually the case that all renames will be prevented.</li>
<li><code>algorithm::traverse()</code> is begun, using the visitor supplied. This will unlink all items using a breadth-first algorithm, from root to tips. With the default visitor, directories which cannot be opened for traversal are ignored; entries which cannot be unlinked are attempted to be renamed into the base directory; entries which cannot be renamed are ignored.</li>
<li>Except for unrenameable files, now the entire directory tree will have been reduced to a minimum possible set of uniquely named items in the base directory, all of which by definition must be undeletable. We now loop attempting to reduce the remaining entries. The default visitor implementation takes a timeout, which if exceeded, an error code comparing equal to <code>errc::timed_out</code> is returned.</li>
</ol>
<p>Even on slow filesystems such as those on Windows, or networked filesystems, this algorithm performs very well. We do not currently inspect the filing system to see if bisect unlinking directories with millions of entries will perform well (some filing systems can store very large directories with multiple independent inode locks, thus using multiple kernel threads on the same directory sees a large performance increase for very large directories). We also remove items based on enumerated order, under the assumption that filesystems will have optimised for this specific use case.</p>
<p>If the function succeeds, <code>dirh</code> is moved into the function, and the total number of filesystem entries removed is returned.</p>
<p>If the function fails, <code>dirh</code> is NOT moved into the function, and continues to refer to the (likely renamed) directory you passed in. You might do something like try to rename it into <code>storage_backed_temporary_files_directory()</code>, or some other hail mary action.</p>
<p>You should review the documentation for <code>algorithm::traverse()</code>, as this algorithm is entirely implemented using that algorithm. </p>

</div>
</div>
<a id="a6165d32704ff21b4aed3046f11b31cb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6165d32704ff21b4aed3046f11b31cb0">&#9670;&nbsp;</a></span>summarize()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">result&lt; <a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traversal__summary.html">traversal_summary</a> &gt; llfio_v2_xxx::algorithm::summarize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>dirh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">stat_t::want&#160;</td>
          <td class="paramname"><em>want</em> = <code><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traversal__summary.html#a8904eee9435edf3562642294046c634e">traversal_summary::default_metadata</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1summarize__visitor.html">summarize_visitor</a> *&#160;</td>
          <td class="paramname"><em>visitor</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>threads</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_slow_path</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Summarise the directory identified <code>dirh</code>, and everything therein. </p>
<p>It can be useful to summarise a directory hierarchy, especially to determine how much storage it occupies, but also how many mounted filesystems it straddles etc. You should specify what metadata you wish to summarise, if this is a subset of what metadata <code>directory_handle::read()</code> returns, performance will be considerably better. The default summarises all possible metadata.</p>
<p>This is a trivial implementation on top of <code>algorithm::traverse()</code>, indeed it is implemented entirely as header code. You should review the documentation for <code>algorithm::traverse()</code>, as this algorithm is entirely implemented using that algorithm. </p>
<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  {</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    LLFIO_LOG_FUNCTION_CALL(&amp;dirh);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    summarize_visitor default_visitor;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">if</span>(visitor == <span class="keyword">nullptr</span>)</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    {</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;      visitor = &amp;default_visitor;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    }</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    result&lt;traversal_summary&gt; state(in_place_type&lt;traversal_summary&gt;);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    state.assume_value().want = want;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    directory_entry entry{{}, stat_t(<span class="keyword">nullptr</span>)};</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    OUTCOME_TRY(entry.stat.fill(dirh, want));</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    OUTCOME_TRY(summarize_visitor::accumulate(state.assume_value(), &amp;state.assume_value(), <span class="keyword">nullptr</span>, entry, want));</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    OUTCOME_TRY(<a class="code" href="namespacellfio__v2__xxx_1_1algorithm.html#ae068bc16598189811d0ce2b3530f1de7">traverse</a>(dirh, visitor, threads, &amp;state.assume_value(), force_slow_path));</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keywordflow">return</span> state;</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  }</div>
</div><!-- fragment -->
</div>
</div>
<a id="ae068bc16598189811d0ce2b3530f1de7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae068bc16598189811d0ce2b3530f1de7">&#9670;&nbsp;</a></span>traverse()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">result&lt;size_t&gt; llfio_v2_xxx::algorithm::traverse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classllfio__v2__xxx_1_1path__handle.html">path_handle</a> &amp;&#160;</td>
          <td class="paramname"><em>dirh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structllfio__v2__xxx_1_1algorithm_1_1traverse__visitor.html">traverse_visitor</a> *&#160;</td>
          <td class="paramname"><em>visitor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>threads</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em> = <code>nullptr</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>force_slow_path</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Traverse everything within and under <code>dirh</code>. </p>
<p>The algorithm is as follows:</p>
<ol type="1">
<li>Call <code>pre_enumeration()</code> of the visitor on the <code>directory_handle</code> about to be enumerated.</li>
<li>Enumerate the contents of the directory.</li>
<li>Call <code>post_enumeration()</code> of the visitor on the contents just enumerated.</li>
<li>For each directory in the contents, append the directory handle and each directory leafname to its hierarchy depth level in a stack of lists.</li>
<li>Loop, using the least deep available item in the stack, until the stack is empty.</li>
</ol>
<p>If <code>known_dirs_remaining</code> exceeds four, a threadpool of not more than <code>threads</code> threads is spun up in order to traverse the hierarchy more quickly.</p>
<p>This algorithm is therefore primarily a breadth-first algorithm, in that we proceed from root, level by level, to the tips. The number returned is the total number of directories traversed.</p>
<h2><a class="anchor" id="autotoc_md17"></a>
Notes</h2>
<p>The implementation tries hard to not open too many file descriptors at a time in order to not exceed the system limit, which may be as low as 1024 on POSIX. On POSIX, it checks <code>getrlimit(RLIMIT_NOFILE)</code> for the soft limit on open file descriptors, and if the remaining unused open file descriptors is less than 65536, it will prefer a slow path implementation which exchanges file descriptor usage for lots more dynamic memory allocation and memory copying. You can force this slow path on any platform using <code>force_slow_path</code>, and in correct code you should always check for failures in <code>directory_open_failed()</code> comparing equal to <code>errc::too_many_files_open</code>, and if encountered restart the traversal using the slow path forced.</p>
<p>Almost every modern POSIX system allows a <code>RLIMIT_NOFILE</code> of over a million nowadays, so you should <code>setrlimit(RLIMIT_NOFILE)</code> appropriately in your program if you are absolutely sure that doing so will not break code in your program (e.g. <code>select()</code> fails spectacularly if file descriptors exceed 1024 on most POSIX).</p>
<p>To give an idea of the difference slow path makes, for Linux ext4:</p>
<ul>
<li>Slow path, 1 thread, traversed 131,915 directories and 8,254,162 entries in 3.10 seconds.</li>
<li>Slow path, 16 threads, traversed 131,915 directories and 8,254,162 entries in 0.966 seconds.</li>
<li>Fast path, 1 thread, traversed 131,915 directories and 8,254,162 entries in 2.73 seconds (+12%).</li>
<li>Fast path, 16 threads, traversed 131,915 directories and 8,254,162 entries in 0.525 seconds (+46%). </li>
</ul>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="anamespacellfio__v2__xxx_1_1algorithm_html_ae068bc16598189811d0ce2b3530f1de7"><div class="ttname"><a href="namespacellfio__v2__xxx_1_1algorithm.html#ae068bc16598189811d0ce2b3530f1de7">llfio_v2_xxx::algorithm::traverse</a></div><div class="ttdeci">result&lt; size_t &gt; traverse(const path_handle &amp;dirh, traverse_visitor *visitor, size_t threads=0, void *data=nullptr, bool force_slow_path=false) noexcept</div><div class="ttdoc">Traverse everything within and under dirh.</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacellfio__v2__xxx.html">llfio_v2_xxx</a></li><li class="navelem"><a class="el" href="namespacellfio__v2__xxx_1_1algorithm.html">algorithm</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>