-
Notifications
You must be signed in to change notification settings - Fork 15
/
working-draft-diffless.html
3747 lines (3408 loc) · 196 KB
/
working-draft-diffless.html
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
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Draft Filesystem Technical Specification</title>
<style type="text/css">
@media print
{
body /* Make room for paragraph numbers, use more of page. */
{
width: 7.0in;
margin-left: -3.5em;
}
div.noprint { display: none; }
}
@media screen
{
body /* Make room for paragraph numbers. */
{
max-width: 6.5in;
margin-left: 2em;
}
div.noscreen { display: none; }
}
[para_num]::before { content: attr(para_num); float: left;
font-size: 70%; margin-left: -3.5em; width: 1.5em; text-align: right;
}
@page
{
@top-left { content: "© ISO/IEC"; margin-left: -3.5em; }
@top-right { content: "N4100"; margin-right: -3.5em; }
@bottom-right { content: counter(page); margin-right: -3.5em; }
}
@page:first
{
@top-left { content: "© ISO 2014 — All rights reserved"; margin-left: -3.5em; }
@top-right { content: normal; }
@bottom-right { content: normal; }
}
div.roman-page
{
display: block;
page:roman-page-numbers;
}
@page roman-page-numbers
{
@bottom-right { content: counter(page, lower-roman); }
}
.page_break { page-break-before: always; }
.page_number_reset { counter-reset: page 1; }
h2 { prince-bookmark-level: 1; }
h3 { prince-bookmark-level: 2; }
h4 { prince-bookmark-level: 3; }
h5 { prince-bookmark-level: 4; }
h6 { prince-bookmark-level: 5; }
/* Make inline code avoid line wraps unless we override it with <br>. */
code { white-space: nowrap; }
pre { background-color:#D7EEFF; font-size: 80%; }
code { font-size: 85%; }
a { text-decoration: none}
a:link {COLOR: #2020FF;}
a:visited {COLOR: #2020FF;}
a:hover {COLOR: #FF2020;}
a:active {COLOR: #009933;}
ins { background-color:#E8FFE8 }
del { background-color:#FFD7D7 }
</style>
</head>
<body>
<!-- generate-paragraph-numbers=false -->
<div class="noprint">
<p>
<table border="0">
<tr>
<td>Document number: </td>
<td><span style="background-color: #FFFF00">Dxxxx</span></td>
</tr>
<tr>
<td>Date:</td>
<td>
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y-%m-%d" startspan -->2014-07-04<!--webbot bot="Timestamp" endspan i-checksum="12446" --></td>
</tr>
<tr>
<td>Revises:</td>
<td>
<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3940.html">N3940</a></td>
</tr>
<tr>
<td>
<p>Project:</td>
<td>
<p>Programming Language C++</td>
</tr>
<tr>
<td valign="top">
<p>Project number:</td>
<td>
<p>TS 18822</td>
</tr>
<tr>
<td valign="top">
<p>Reply-to:</td>
<td>
<p>Beman Dawes <bdawes at acm dot org></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<!-- generate-section-numbers=false -->
<h1 class="page_break" align="center">Working Draft,<br>
Technical Specification — File System</h1>
<p> </p>
<p> </p>
<p> </p>
<p><b>Note: this is an early draft. It’s known to be incomplet and incorrekt,
and it has lots of b<sub>a</sub>d for<sup>m</sup>atting.</b><p>
<p>© ISO/IEC</p>
</div>
<div class="noscreen">
<p align="right">ISO/IEC JTC 1/SC 22/WG 21 N4100<br>
Date: 2014-07-04<br>
ISO/IEC DTS 18822<br>
ISO/IEC JTC1 SC22<br>
Secretariat: ANSI</p>
</p>
<p> </p>
<p> </p>
<p> </p>
<p><b><font size="5">Programming Languages — C++<br>
— File System Technical Specification</font></b></p>
<p><b><font size="4">Langages de programmation — C++<br>
— Spécification technique de système de fichiers</font></b></p>
<p> </p>
<p> </p>
<table border="1" cellpadding="10" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%"><p align="center"><b>Warning</b></p>
<p>This document is not an ISO Technical Specification. It is distributed for review and comment. It is
subject to change without notice and may not be referred to as a Technical Specification.
</p>
<p>Recipients of this draft are invited to submit, with their comments, notification of any relevant
patent rights of which they are aware and to provide supporting documentation.</p></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p>Document type: Draft Technical Specification<br>
Document stage: (40) Enquiry<br>
Document Language: E</p>
</div>
<div class ="roman-page">
<div class="noscreen">
<table border="1" cellpadding="10" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%"><p align="center"><b>Copyright notice</b></p>
<p>This ISO document is a working draft or committee draft and is copyright-protected by ISO. While
the reproduction of working drafts or committee drafts in any form for use by participants in the
ISO standards development process is permitted without prior permission from ISO, neither this
document nor any extract from it may be reproduced, stored or transmitted in any form for any
other purpose without prior written permission from ISO.</p>
<p>Requests for permission to reproduce this document for the purpose of selling it should be
addressed as shown below or to ISO’s member body in the country of the requester:</p>
<blockquote><p>ISO copyright officer<br>
Case postale 56, CH-1211 Geneva 20<br>
Tel. + 41 22 749 01 11<br>
Fax + 41 22 749 09 47<br>
E-mail [email protected]<br>
Web www.iso.org
</p></blockquote>
<p>Reproduction may be subject to royalty payments or a licensing agreement.</p>
<p>Violators may be prosecuted.</p></td>
</tr>
</table>
</div>
<h2 class="page_break"> <a name="TOC">Contents</a></h2>
<blockquote>
<p> <a href="#TOC"> Contents</a><br>
<a href="#Scope">1 Scope </a><br>
<a href="#Conformance">2 Conformance </a><br>
<a href="#fs.conform.9945">2.1 POSIX conformance </a><br>
<a href="#fs.conform.os">2.2 Operating system dependent behavior conformance</a><br>
<a href="#fs.race.behavior">2.3 File system race
behavior</a><br>
<a href="#Normative-references">3 Normative references </a><br>
<a href="#Definitions">4 Terms and definitions </a><br>
<a href="#Absolute-path">4.1 absolute path </a><br>
<a href="#canonical-path">4.2 canonical path </a><br>
<a href="#directory">4.3 directory </a><br>
<a href="#file">4.4 file </a><br>
<a href="#file-system">4.5 file system </a><br>
<a href="#file-system-race">4.6 file system race </a><br>
<a href="#filename">4.7 filename </a><br>
<a href="#hard-link">4.8 hard link </a><br>
<a href="#link">4.9 link </a><br>
<a href="#fs.def.native.encode">4.10 native encoding </a><br>
<a href="#fs.def.native">4.11 native pathname format </a><br>
<a href="#NTCTS">4.12 NTCTS </a><br>
<a href="#operating system dependent">4.13 operating system dependent behavior
</a><br>
<a href="#fs.def.parent">4.14 parent directory </a><br>
<a href="#path">4.15 path </a><br>
<a href="#fs.def.pathname">4.16 pathname </a><br>
<a href="#fs.def.pathres">4.17 pathname resolution </a><br>
<a href="#Relative-path">4.18 relative path </a><br>
<a href="#symbolic-link">4.19 symbolic link </a><br>
<a href="#fs.req">5 Requirements</a><br>
<a href="#Namespaces-and-headers">5.1 Namespaces and headers</a><br>
<a href="#fs.req.macros">5.2 Feature test macros</a><a href="#fs.req"> </a><br>
<a href="#Header-filesystem-synopsis">6 Header <code><experimental/filesystem></code> synopsis
</a><br>
<a href="#Error-reporting">7 Error reporting </a><br>
<a href="#class-path">8 Class <code>path</code> </a><br>
<a href="#path.generic">8.1 <code>path</code> generic pathname format grammar </a><br>
<a href="#path-Conversions">8.2 <code>path</code> conversions </a><br>
<a href="#path-Conversions-to-native-format">8.2.1 <code>path</code> argument format
conversions </a><br>
<a href="#path.arg.convert">8.2.2 <code>path</code> type and encoding conversions </a><br>
<a href="#path-Requirements">8.3 <code>path</code> requirements </a><br>
<a href="#path.member">8.4 <code>path</code> members </a><br>
<a href="#path-constructors">8.4.1 <code>path</code> constructors </a><br>
<a href="#path-assignments">8.4.2 <code>path</code> assignments </a><br>
<a href="#path-appends">8.4.3 <code>path</code> appends
</a><br>
<a href="#path-concatenation">8.4.4 <code>path</code> concatenation </a><br>
<a href="#path-modifiers">8.4.5 <code>path</code> modifiers </a><br>
<a href="#path-native-format-observers">8.4.6 <code>path</code> native format observers
</a><br>
<a href="#path-generic-format-observers">8.4.7 <code>path</code> generic format observers
</a><br>
<a href="#path-compare">8.4.8 <code>path</code> compare </a><br>
<a href="#path-decomposition">8.4.9 <code>path</code> decomposition
</a><br>
<a href="#path-query">8.4.10 <code>path</code> query </a><br>
<a href="#path-iterators">8.5 <code>path</code> iterators </a><br>
<a href="#path-non-member-functions">8.6 <code>path</code> non-member functions
</a><br>
<a href="#path-inserter-extractor">8.6.1 <code>path</code> inserter and extractor </a><br>
<a href="#path.factory">8.6.2 <code>path</code> factory functions </a><br>
<a href="#Class-filesystem_error">9 Class <code>filesystem_error</code>
</a><br>
<a href="#filesystem_error-members">9.1 <code>filesystem_error</code> members
</a><br>
<a href="#fs.enum">10 Enumerations </a><br>
<a href="#Enum-file_type">10.1 Enum class <code>file_type</code> </a><br>
<a href="#enum.copy_options">10.2 Enum class <code>copy_options</code> </a><br>
<a href="#enum.perms">10.3 Enum class <code>perms</code> </a><br>
<a href="#enum.directory_options">10.4 Enum class <code>directory_options</code> </a><br>
<a href="#file_status">11 Class <code>file_status</code> </a><br>
<a href="#file_status-constructors">11.1 <code>file_status</code> constructors
</a><br>
<a href="#file_status-observers">11.2 <code>file_status</code> observers </a><br>
<a href="#file_status-modifiers">11.3 <code>file_status</code> modifiers </a><br>
<a href="#Class-directory_entry">12 Class <code>directory_entry</code> </a><br>
<a href="#directory_entry-constructors">12.1 <code>directory_entry</code> constructors
</a><br>
<a href="#directory_entry-modifiers">12.2 <code>directory_entry</code> modifiers
</a><br>
<a href="#directory_entry-observers">12.3 <code>directory_entry</code> observers
</a><br>
<a href="#Class-directory_iterator">13 Class <code>directory_iterator</code>
</a><br>
<a href="#directory_iterator-members">13.1 <code>directory_iterator</code> members
</a><br>
<a href="#directory_iterator-non-member-functions">13.2 <code>directory_iterator</code> non-member functions
</a><br>
<a href="#class.rec.dir.itr">14 Class <code>recursive_directory_iterator</code>
</a><br>
<a href="#recursive_directory_iterator-members">14.1 <code>recursive_directory_iterator</code> members
</a><br>
<a href="#rec.dir.itr.nonmembers">14.2 <code>recursive_directory_iterator</code> non-member functions
</a><br>
<a href="#Operational-functions">15 Operational functions </a><br>
<a href="#fs.op.absolute">15.1 Absolute </a><br>
<a href="#fs.op.canonical">15.2 Canonical </a><br>
<a href="#fs.op.copy">15.3 Copy </a><br>
<a href="#fs.op.copy_file">15.4 Copy file </a><br>
<a href="#fs.op.copy_symlink">15.5 Copy symlink </a><br>
<a href="#fs.op.create_directories">15.6 Create directories </a><br>
<a href="#fs.op.create_directory">15.7 Create directory </a><br>
<a href="#fs.op.create_dir_symlk">15.8 Create directory symlink </a><br>
<a href="#fs.op.create_hard_lk">15.9 Create hard link </a><br>
<a href="#fs.op.create_symlink">15.10 Create symlink </a><br>
<a href="#fs.op.current_path">15.11 Current path </a><br>
<a href="#fs.op.exists">15.12 Exists </a><br>
<a href="#fs.op.equivalent">15.13 Equivalent </a><br>
<a href="#fs.op.file_size">15.14 File size </a><br>
<a href="#fs.op.hard_lk_ct">15.15 Hard link count </a><br>
<a href="#fs.op.is_block_file">15.16 Is block file </a><br>
<a href="#fs.op.is_char_file">15.17 Is character file </a><br>
<a href="#fs.op.is_directory">15.18 Is directory </a><br>
<a href="#fs.op.is_empty">15.19 Is empty </a><br>
<a href="#fs.op.is_fifo">15.20 Is fifo </a><br>
<a href="#fs.op.is_other">15.21 Is other </a><br>
<a href="#fs.op.is_regular_file">15.22 Is regular file </a><br>
<a href="#fs.op.is_socket">15.23 Is socket </a><br>
<a href="#fs.op.is_symlink">15.24 Is symlink </a><br>
<a href="#fs.op.last_write_time">15.25 Last write time </a><br>
<a href="#fs.op.permissions">15.26 Permissions </a><br>
<a href="#fs.op.read_symlink">15.27 Read symlink </a><br>
<a href="#fs.op.remove">15.28 Remove </a><br>
<a href="#fs.op.remove_all">15.29 Remove all </a><br>
<a href="#fs.op.rename">15.30 Rename </a><br>
<a href="#fs.op.resize_file">15.31 Resize file </a><br>
<a href="#fs.op.space">15.32 Space </a><br>
<a href="#fs.op.status">15.33 Status </a><br>
<a href="#fs.op.status_known">15.34 Status known </a><br>
<a href="#fs.op.symlink_status">15.35 Symlink status </a><br>
<a href="#fs.op.system_complete">15.36 System complete </a><br>
<a href="#fs.op.temp_dir_path">15.37 Temporary directory
path</a></p>
</blockquote>
<hr>
</div>
<!-- generate-section-numbers=true -->
<!-- generate-paragraph-numbers=true -->
<h2 class="page_number_reset">1 <a name="Scope">Scope</a> [<a name="fs.scope">fs.scope</a>]</h2>
<p para_num="1">This Technical Specification specifies requirements for implementations of an
interface that computer programs written in the C++ programming language may use
to perform operations on file systems and their components, such as paths,
regular files, and directories. This Technical Specification is applicable to
information technology systems that can access hierarchical file systems, such
as those with operating systems that conform to the POSIX (<a href="#fs.norm.ref">3</a>)
interface. This Technical Specification is applicable only to vendors who wish
to provide the interface it describes.</p>
<h2>2 <a name="Conformance">Conformance</a> [<a name="fs.conformance">fs.conformance</a>]</h2>
<p para_num="1">Conformance is specified in terms of behavior. Ideal behavior is not always
implementable, so the conformance sub-clauses take that into account.</p>
<h3>2.1 POSIX conformance [<a name="fs.conform.9945">fs.conform.9945</a>]</h3>
<p para_num="1">Some behavior is specified by reference to POSIX (<a href="#fs.norm.ref">3</a>). How such behavior is actually implemented is unspecified.</p>
<blockquote>
<p para_num="2">[<i>Note:</i> This constitutes an "as if" rule allowing implementations
to call native
operating system or other API's. <i>—end note</i>]</p>
</blockquote>
<p para_num="3">Implementations are encouraged to provide such behavior as it is defined by
POSIX. Implementations shall document any behavior that differs from the
behavior defined by POSIX. Implementations that do not support exact POSIX
behavior are encouraged to provide behavior as close to POSIX behavior as is reasonable given the
limitations of actual operating systems and file systems. If an implementation cannot provide any
reasonable behavior, the implementation shall report an error as specified in §
<a href="#fs.err.report">7</a>.
</p>
<blockquote>
<p para_num="4">[<i>Note:</i> This allows users to rely on an exception being thrown or
an error code being set when an implementation cannot provide any reasonable
behavior. — <i>end note</i>]</p>
</blockquote>
<p para_num="5">Implementations are not required to provide behavior that is not supported by
a particular file system.</p>
<blockquote>
<p para_num="6">[<i>Example:</i> The <a href="http://en.wikipedia.org/wiki/FAT_filesystem">
FAT file system</a> used by some memory cards, camera memory, and floppy discs
does not support hard links, symlinks, and many other features of more capable
file systems, so implementations are not required to support those features
on the FAT file system. <i>—end example</i>]</p>
</blockquote>
<h3>2.2 Operating system dependent behavior conformance [<a name="fs.conform.os">fs.conform.os</a>]</h3>
<p para_num="1">Some behavior is specified as being
operating system dependent (<a href="#fs.def.osdep">4.13</a>). The operating system an
implementation is dependent upon is implementation defined.</p>
<p para_num="2">It is permissible for an implementation to be dependent upon an operating
system emulator rather than the actual underlying operating system.</p>
<h3>2.3 File system race behavior [<a name="fs.race.behavior">fs.race.behavior</a>]</h3>
<p para_num="1">Behavior is undefined if calls to functions provided by this Technical
Specification introduce a file system race (<a href="#fs.def.race">4.6</a>).</p>
<p para_num="2">If the possibility of a file system race would make it unreliable for a
program to test for a precondition before calling a function described herein, <i>
Requires</i> is not specified for the function.</p>
<blockquote>
<p para_num="3">[<i>Note:</i> As a design practice, preconditions are not specified when it
is unreasonable for a program to detect them prior to calling the function. <i>
—end note</i>]</p>
</blockquote>
<h2>3 <a name="Normative-references">Normative references</a> [<a name="fs.norm.ref">fs.norm.ref</a>]</h2>
<p para_num="1">The following referenced documents are indispensable for the application of
this document. For dated references, only the edition cited applies. For undated
references, the latest edition of the referenced document (including any
amendments) applies. </p>
<ul>
<li para_num="2">ISO/IEC 14882, <i>Programming Language C++<br>
</i></li>
<li para_num="3">ISO/IEC 9945, <i>Information Technology — Portable Operating System
Interface (POSIX)</i></li>
</ul>
<p para_num="4">[<i>Note:</i> The programming language and library described in ISO/IEC 14882
is herein called <i>the C++ Standard</i>. References to clauses within the C++
Standard are written as "C++14 §3.2". Section references are relative
to <a href="http://www.open-std.org/jtc1/sc22/wg21/prot/14882fdis/n3936.pdf">
N3936</a>.
<p para_num="5">The operating system interface
described in ISO/IEC 9945 is herein called <i>POSIX</i>. <i>—end note</i>]<p para_num="6">This
Technical Specification mentions commercially
available operating systems for purposes of exposition.<sup> <a href="#footnote">
[footnote]</a></sup><p para_num="7">Unless otherwise specified, the whole of the C++
Standard's Library introduction (C++14 §17) is included into this Technical
Specification by reference.</p>
<blockquote>
<p para_num="8"><sup>[<a name="footnote">footnote</a>]</sup> POSIX® is
a registered trademark of The IEEE. MAC OS® is a registered trademark of Apple
Inc. Windows® is a registered trademark of Microsoft Corporation. This information is given for the convenience of
users of this document and does not constitute an endorsement by ISO or IEC of
these products.</blockquote>
<h2>4 <a name="Definitions">Terms and definitions</a> [<a name="fs.definitions">fs.definitions</a>]</h2>
<p para_num="1">For the purposes of this document, the terms and definitions given in the C++
Standard and the following apply.</p>
<h3>4.1 <a name="Absolute-path">absolute path</a> [<a name="fs.def.absolute-path">fs.def.absolute-path</a>]</h3>
<p para_num="1">A path that
unambiguously
identifies the location of a file without reference to an additional starting
location. The elements of a path that determine if it is absolute are
operating system dependent.</p>
<h3>4.2 <a name="canonical-path">canonical path</a> [<a name="fs.def.canonical-path">fs.def.canonical-path</a>]</h3>
<p para_num="1">An absolute path that has no elements that are symbolic links, and no dot or
dot-dot elements (<a href="#path.generic">8.1</a>).</p>
<h3>4.3 <a name="directory">directory</a> [<a name="fs.def.directory">fs.def.directory</a>]</h3>
<p para_num="1">A file within a file system that acts as a container of directory entries
that contain information about
other files, possibly including other directory files.</p>
<h3>4.4 <a name="file">file</a> [<a name="fs.def.file">fs.def.file</a>]</h3>
<p para_num="1">An object within a file system that holds user or system data. Files can be written to, or read from, or both. A file
has certain attributes, including type. File types include regular files
and directories. Other types of files, such as symbolic links, may be supported by the
implementation.</p>
<h3>4.5 <a name="file-system">file system</a> [<a name="fs.def.filesystem">fs.def.filesystem</a>]</h3>
<p para_num="1">A collection of files and certain of their attributes.</p>
<h3>4.6 <a name="file-system-race">file system race</a> [<a name="fs.def.race">fs.def.race</a>]</h3>
<p para_num="1">The condition that occurs
when multiple threads, processes, or computers interleave access and
modification of
the same object within a file system.</p>
<h3>4.7 <a name="filename">filename</a> [<a name="fs.def.filename">fs.def.filename</a>]</h3>
<p para_num="1">The name of a file. Filenames dot
and dot-dot have special meaning. The following characteristics of
filenames are operating system dependent:</p>
<ul>
<li para_num="2">The permitted characters. [<i>Example</i>: Some operating systems prohibit the ASCII control characters (0x00-0x1F)
in filenames. <i>—end example</i>].
</li>
<li para_num="3">The maximum permitted length.</li>
<li para_num="4">Filenames that are not permitted.</li>
<li para_num="5">Filenames that have special meaning.</li>
<li para_num="6">Case awareness and sensitivity during path resolution.</li>
<li para_num="7">Special rules that may apply to file types other than regular
files, such as directories.</li>
</ul>
<h3>4.8 <a name="hard-link">hard link</a> [<a name="fs.def.hardlink">fs.def.hardlink</a>]</h3>
<p para_num="1">A link (<a href="#fs.def.link">4.9</a>) to an existing file. Some
file systems support multiple hard links to a file. If the last hard link to a
file is removed, the file itself is removed.</p>
<blockquote>
<p para_num="2">[<i>Note:</i> A hard link can be thought of as a shared-ownership smart
pointer to a file.<i> —end note</i>]<i> </i></p>
</blockquote>
<h3>4.9 <a name="link">link</a> [<a name="fs.def.link">fs.def.link</a>]</h3>
<p para_num="1">A directory entry that associates a
filename with a file. A link is either a hard link (<a href="#fs.def.hardlink">4.8</a>) or a
symbolic link (<a href="#fs.def.symlink">4.19</a>).</p>
<h3>4.10 native encoding [<a name="fs.def.native.encode">fs.def.native.encode</a>]</h3>
<p para_num="1">For narrow character strings, the operating system dependent current encoding
for path names. For wide character strings, the implementation defined execution
wide-character set encoding (C++14 §2.3).</p>
<h3>4.11 native pathname format [<a name="fs.def.native">fs.def.native</a>]</h3>
<p para_num="1">The operating system dependent pathname format accepted by the host operating system.</p>
<h3>4.12 <a name="NTCTS">NTCTS</a> [<a name="fs.def.ntcts">fs.def.ntcts</a>]</h3>
<p para_num="1">Acronym for "null-terminated character-type sequence". Describes a sequence
of values of a given encoded character type terminated by that type's null character. If
the encoded character type is <code>EcharT</code>, the null character can be constructed
by <code>EcharT()</code>. </p>
<h3>4.13 <a name="operating system dependent">operating system dependent</a> behavior
[<a name="fs.def.osdep">fs.def.osdep</a>]</h3>
<p para_num="1">Behavior that is dependent upon the behavior
and characteristics of an operating system. See [fs.conform.os].</p>
<h3>4.14 parent directory [<a name="fs.def.parent">fs.def.parent</a>]</h3>
<p para_num="1">When discussing a given directory, the directory that both contains a
directory entry for the given directory and is represented by the filename
dot-dot in the given directory.</p>
<p para_num="2">When discussing other types of files, a directory containing a directory
entry for the file under discussion.</p>
<p para_num="3">This concept does not apply to dot and dot-dot.</p>
<h3>4.15 <a name="path">path</a> [<a name="fs.def.path">fs.def.path</a>]</h3>
<p para_num="1">A sequence of elements that identify
the location of a file within a filesystem. The elements are the <i>root-name<sub>opt</sub></i>, <i>
root-directory<sub>opt</sub></i>, and an optional sequence of filenames.
The maximum number of elements in the sequence is operating system dependent.
</p>
<h3>4.16 pathname [<a name="fs.def.pathname">fs.def.pathname</a>]</h3>
<p para_num="1">A character string that represents the name of a path. Pathnames are
formatted according to the generic pathname format grammar (<a href="#path.generic">8.1</a>) or an
operating system dependent
native pathname format.</p>
<h3>4.17 pathname resolution [<a name="fs.def.pathres">fs.def.pathres</a>]</h3>
<p para_num="1">Pathname resolution is the operating system dependent mechanism for resolving
a pathname to a particular file in a file hierarchy. There may be multiple
pathnames that resolve to the same file. [<i>Example:</i> POSIX specifies the mechanism in section 4.11, Pathname resolution. <i>
—end example]</i></p>
<h3>4.18 <a name="Relative-path">relative path</a> [<a name="fs.def.relative-path">fs.def.relative-path</a>]</h3>
<p para_num="1">A path that
is not absolute, and so only
unambiguously
identifies the location of a file when resolved relative to
an implied starting location. The elements of a path that determine if it is
relative are operating system dependent. [<i>Note:</i>
Pathnames <code>"."</code> and <code>".."</code> are relative paths. <i>—end note</i>]</p>
<h3>4.19 <a name="symbolic-link">symbolic link</a> [<a name="fs.def.symlink">fs.def.symlink</a>]</h3>
<p para_num="1">A type of file with the
property that when the file is encountered during pathname resolution, a string
stored by the file is used to modify the pathname resolution. </p>
<blockquote>
<p para_num="2">[<i>Note:</i> Symbolic links are often called symlinks. A symbolic link can be thought of as a raw pointer to a file.
If the file pointed to does not exist, the symbolic link is said to be a
"dangling" symbolic link.<i> —end note</i>]<i> </i></p>
</blockquote>
<h2>5 Requirements [<a name="fs.req">fs.req</a>]</h2>
<p para_num="1">Throughout this Technical Specification, <code>char</code>, <code>wchar_t</code>,
<code>char16_t</code>, and <code>char32_t</code> are collectively called <i>
encoded character types</i>.</p>
<p para_num="2">Template parameters named <code>EcharT</code> shall be one of the
encoded character types.</p>
<p para_num="3">Template parameters named <code>InputIterator</code> shall meet the
C++ Standard's library input iterator requirements (C++14 §24.2.3) and shall
have a value type that is one of the encoded character types.</p>
<blockquote>
<p para_num="4">[<i>Note:</i> Use of an encoded character type implies an associated
encoding. Since <code>signed char</code> and <code>unsigned char</code> have no
implied encoding, they are not included as permitted types. <i>—end note</i>]</p>
</blockquote>
<p para_num="5">Template parameters named <code>Allocator</code> shall meet the C++
Standard's library Allocator requirements (C++14 §17.6.3.5).</p>
<h3>5.1 <a name="Namespaces-and-headers">Namespaces and headers</a> [<a name="fs.req.namespace">fs.req.namespace</a>]</h3>
<p para_num="1">The components described in this technical specification are experimental and
not part of the C++ standard library. All components described in this technical
specification are declared in namespace <code>std::experimental::filesystem::v1</code>
or a sub-namespace thereof unless otherwise specified. The header described in
this technical specification shall import the contents of <code>
std::experimental::filesystem::v1</code> into <code>std::experimental::filesystem</code> as
if by</p>
<blockquote>
<pre para_num="2">namespace std {
namespace experimental {
namespace filesystem {
inline namespace v1 {}
}
}
}</pre>
</blockquote>
<p para_num="3">Unless otherwise specified, references to other entities described in this
technical specification are assumed to be qualified with <code>std::experimental::</code><code>filesystem::v1::</code>,
and references to entities described in the C++ standard are assumed to be qualified
with <code>std::</code>.</p>
<h3>5.2 Feature test macros [<a name="fs.req.macros">fs.req.macros</a>]</h3>
<p para_num="1">This macro allows users to determine which version of this
Technical Specification is supported by header <code><experimental/filesystem></code>.</p>
<p para_num="2">Header <code><experimental/filesystem></code> shall supply
the following macro definition:</p>
<blockquote>
<div>
<pre para_num="3">#define __cpp_lib_experimental_filesystem 201406</pre>
</div>
</blockquote>
<p para_num="4">[<i>Note:</i> The value of macro <code>__cpp_lib_experimental_filesystem</code>
is <i>yyyymm</i> where <i>yyyy</i> is the year and <i>mm</i> the month when the
version of the Technical Specification was completed. <i>— end note</i>]</p>
<h2>6 <a name="Header-filesystem-synopsis">Header <code><experimental/filesystem></code> synopsis</a>
[<a name="fs.filesystem.synopsis">fs.filesystem.synopsis</a>]</h2>
<pre para_num="1">namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
class <a href="#class-path">path</a>;
void swap(path& lhs, path& rhs) noexcept;
size_t <a href="#hash_value">hash_value</a>(const path& p) noexcept;
bool operator==(const path& lhs, const path& rhs) noexcept;
bool operator!=(const path& lhs, const path& rhs) noexcept;
bool operator< (const path& lhs, const path& rhs) noexcept;
bool operator<=(const path& lhs, const path& rhs) noexcept;
bool operator> (const path& lhs, const path& rhs) noexcept;
bool operator>=(const path& lhs, const path& rhs) noexcept;
path operator/ (const path& lhs, const path& rhs);
template <class charT, class traits>
basic_ostream<charT, traits>&
operator<<(basic_ostream<charT, traits>& os, const path& p);
template <class charT, class traits>
basic_istream<charT, traits>&
operator>>(basic_istream<charT, traits>& is, path& p);
template <class <a href="#Source">Source</a>>
path u8path(const Source& source);
template <class InputIterator>
path u8path(InputIterator first, InputIterator last);
class <a href="#Class-filesystem_error">filesystem_error</a>;
class <a href="#Class-directory_entry">directory_entry</a>;
class <a href="#Class-directory_iterator">directory_iterator</a>;
// enable directory_iterator range-based for statements
directory_iterator <a href="#directory_iterator-non-member-functions">begin</a>(directory_iterator iter) noexcept;
directory_iterator <a href="#directory_iterator-non-member-functions">end</a>(const directory_iterator&) noexcept;
class <a href="#class.rec.dir.itr">recursive_directory_iterator</a>;
// enable recursive_directory_iterator range-based for statements
recursive_directory_iterator <a href="#rec.dir.itr.nonmembers">begin</a>(recursive_directory_iterator iter) noexcept;
recursive_directory_iterator <a href="#rec.dir.itr.nonmembers">end</a>(const recursive_directory_iterator&) noexcept;
class <a href="#file_status">file_status</a>;
struct <a name="space_info">space_info</a>
{
uintmax_t capacity;
uintmax_t free;
uintmax_t available;
};
enum class <a href="#enum.file_type">file_type</a>;
enum class <a href="#enum.perms">perms</a>;
enum class <a name="copy_option" href="#enum.copy_options">copy_options</a>;
enum class <a name="symlink_option" href="#enum.directory_options">directory_options</a>;
typedef chrono::time_point<<b><i>trivial-clock</i></b>> file_time_type;
// <a href="#Operational-functions">operational functions</a>
path <a href="#absolute">absolute</a>(const path& p, const path& base=current_path());
path <a href="#canonical">canonical</a>(const path& p, const path& base = current_path());
path <a href="#canonical">canonical</a>(const path& p, error_code& ec);
path <a href="#canonical">canonical</a>(const path& p, const path& base, error_code& ec);
void <a href="#copy">copy</a>(const path& from, const path& to);
void <a href="#copy">copy</a>(const path& from, const path& to, error_code& ec) noexcept;
void <a href="#copy">copy</a>(const path& from, const path& to, <a href="#copy_option">copy_options</a> options);
void <a href="#copy">copy</a>(const path& from, const path& to, <a href="#copy_option">copy_options</a> options,
error_code& ec) noexcept;
bool <a href="#copy_file">copy_file</a>(const path& from, const path& to);
bool <a href="#copy_file">copy_file</a>(const path& from, const path& to, error_code& ec) noexcept;
bool <a href="#copy_file">copy_file</a>(const path& from, const path& to, <a href="#copy_option">copy_options</a> option);
bool <a href="#copy_file">copy_file</a>(const path& from, const path& to, <a href="#copy_option">copy_options</a> option,
error_code& ec) noexcept;
void <a href="#copy_symlink">copy_symlink</a>(const path& existing_symlink, const path& new_symlink);
void <a href="#copy_symlink">copy_symlink</a>(const path& existing_symlink, const path& new_symlink,
error_code& ec) noexcept;
bool <a href="#create_directories">create_directories</a>(const path& p);
bool <a href="#create_directories">create_directories</a>(const path& p, error_code& ec) noexcept;
bool <a href="#create_directory">create_directory</a>(const path& p);
bool <a href="#create_directory">create_directory</a>(const path& p, error_code& ec) noexcept;
bool <a href="#create_directory2">create_directory</a>(const path& p, const path& attributes);
bool <a href="#create_directory2">create_directory</a>(const path& p, const path& attributes,
error_code& ec) noexcept;
void <a href="#create_directory_symlink">create_directory_symlink</a>(const path& to, const path& new_symlink);
void <a href="#create_directory_symlink">create_directory_symlink</a>(const path& to, const path& new_symlink,
error_code& ec) noexcept;
void <a href="#create_hard_link">create_hard_link</a>(const path& to, const path& new_hard_link);
void <a href="#create_hard_link">create_hard_link</a>(const path& to, const path& new_hard_link,
error_code& ec) noexcept;
void <a href="#create_symlink">create_symlink</a>(const path& to, const path& new_symlink);
void <a href="#create_symlink">create_symlink</a>(const path& to, const path& new_symlink,
error_code& ec) noexcept;
path <a href="#current_path">current_path</a>();
path <a href="#current_path">current_path</a>(error_code& ec);
void <a href="#current_path">current_path</a>(const path& p);
void <a href="#current_path">current_path</a>(const path& p, error_code& ec) noexcept;
bool <a href="#exists">exists</a>(file_status s) noexcept;
bool <a href="#exists">exists</a>(const path& p);
bool <a href="#exists">exists</a>(const path& p, error_code& ec) noexcept;
bool <a href="#equivalent">equivalent</a>(const path& p1, const path& p2);
bool <a href="#equivalent">equivalent</a>(const path& p1, const path& p2, error_code& ec) noexcept;
uintmax_t <a href="#file_size">file_size</a>(const path& p);
uintmax_t <a href="#file_size">file_size</a>(const path& p, error_code& ec) noexcept;
uintmax_t <a href="#hard_link_count">hard_link_count</a>(const path& p);
uintmax_t <a href="#hard_link_count">hard_link_count</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_block_file">is_block_file</a>(file_status s) noexcept;
bool <a href="#is_block_file">is_block_file</a>(const path& p);
bool <a href="#is_block_file">is_block_file</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_character_file">is_character_file</a>(file_status s) noexcept;
bool <a href="#is_character_file">is_character_file</a>(const path& p);
bool <a href="#is_character_file">is_character_file</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_directory">is_directory</a>(file_status s) noexcept;
bool <a href="#is_directory">is_directory</a>(const path& p);
bool <a href="#is_directory">is_directory</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_empty">is_empty</a>(const path& p);
bool <a href="#is_empty">is_empty</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_fifo">is_fifo</a>(file_status s) noexcept;
bool <a href="#is_fifo">is_fifo</a>(const path& p);
bool <a href="#is_fifo">is_fifo</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_other">is_other</a>(file_status s) noexcept;
bool <a href="#is_other2">is_other</a>(const path& p);
bool <a href="#is_other2">is_other</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_regular_file">is_regular_file</a>(file_status s) noexcept;
bool i<a href="#is_regular_file2">s_regular_file</a>(const path& p);
bool i<a href="#is_regular_file2">s_regular_file</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_socket">is_socket</a>(file_status s) noexcept;
bool <a href="#is_socket">is_socket</a>(const path& p);
bool <a href="#is_socket">is_socket</a>(const path& p, error_code& ec) noexcept;
bool <a href="#is_symlink">is_symlink</a>(file_status s) noexcept;
bool <a href="#is_symlink2">is_symlink</a>(const path& p);
bool <a href="#is_symlink2">is_symlink</a>(const path& p, error_code& ec) noexcept;
file_time_type <a href="#last_write_time">last_write_time</a>(const path& p);
file_time_type <a href="#last_write_time">last_write_time</a>(const path& p, error_code& ec) noexcept;
void <a href="#last_write_time2">last_write_time</a>(const path& p, file_time_type new_time);
void <a href="#last_write_time2">last_write_time</a>(const path& p, file_time_type new_time,
error_code& ec) noexcept;
void <a href="#fs.op.permissions">permissions</a>(const path& p, perms prms);
void <a href="#fs.op.permissions">permissions</a>(const path& p, perms prms, error_code& ec) noexcept;
path <a href="#read_symlink">read_symlink</a>(const path& p);
path <a href="#read_symlink">read_symlink</a>(const path& p, error_code& ec);
bool <a href="#remove">remove</a>(const path& p);
bool <a href="#remove">remove</a>(const path& p, error_code& ec) noexcept;
uintmax_t <a href="#remove_all">remove_all</a>(const path& p);
uintmax_t <a href="#remove_all">remove_all</a>(const path& p, error_code& ec) noexcept;
void <a href="#rename">rename</a>(const path& from, const path& to);
void <a href="#rename">rename</a>(const path& from, const path& to, error_code& ec) noexcept;
void <a href="#resize_file">resize_file</a>(const path& p, uintmax_t size);
void <a href="#resize_file2">resize_file</a>(const path& p, uintmax_t size, error_code& ec) noexcept;
<a href="#space_info">space_info</a> <a href="#space">space</a>(const path& p);
<a href="#space_info">space_info</a> <a href="#space">space</a>(const path& p, error_code& ec) noexcept;
<a href="#file_status">file_status</a> <a href="#status">status</a>(const path& p);
<a href="#file_status">file_status</a> <a href="#status">status</a>(const path& p, error_code& ec) noexcept;
bool <a href="#status_known">status_known</a>(file_status s) noexcept;
<a href="#file_status">file_status</a> <a href="#symlink_status">symlink_status</a>(const path& p);
<a href="#file_status">file_status</a> <a href="#symlink_status">symlink_status</a>(const path& p, error_code& ec) noexcept;
path <a href="#system_complete">system_complete</a>(const path& p);
path <a href="#system_complete">system_complete</a>(const path& p, error_code& ec);
path <a href="#temp_directory_path">temp_directory_path</a>();
path <a href="#temp_directory_path">temp_directory_path</a>(error_code& ec);
} } } } // namespaces std::experimental::filesystem::v1</pre>
<p para_num="2"><b><i><code>trivial-clock</code></i></b> is an implementation-defined type that satisfies the
<code>TrivialClock</code> requirements (C++14 §20.12.3)
and that is capable of representing and measuring file time values.
Implementations should ensure that the resolution and range of <tt>
file_time_type</tt> reflect the operating system dependent resolution and range
of file time values.</p>
<h2>7 <a name="Error-reporting">Error reporting</a> [<a name="fs.err.report">fs.err.report</a>]</h2>
<p para_num="1">Filesystem library functions often provide two overloads, one that
throws an exception to report file system errors, and another that sets an <code>error_code</code>.</p>
<blockquote>
<p para_num="2">[<i>Note:</i> This supports two common use cases:</p>
<ul>
<li para_num="3">Uses where file system
errors are truly exceptional and indicate a serious failure. Throwing an
exception is the most appropriate response. This is the preferred default for
most everyday programming.<br>
</li>
<li para_num="4">Uses where file system errors are routine and do not necessarily represent
failure. Returning an error code is the most appropriate response. This allows
application specific error handling, including simply ignoring the error.</li>
</ul>
<p para_num="5"><i>—end note</i>]</p>
</blockquote>
<p para_num="6">Functions <b>not</b> having an argument of type <code>error_code&</code> report errors as follows, unless otherwise specified:</p>
<ul>
<li para_num="7">When a call by the
implementation to an operating system or other underlying API results in an
error that prevents the function from meeting its specifications, an exception
of type
<code>filesystem_error</code> shall be thrown. For functions with a single path
argument, that argument shall be passed to the
<code>filesystem_error</code> constructor with a single path argument. For
functions with two path arguments, the first of these arguments shall be
passed to the
<code>filesystem_error</code> constructor as the <code>path1</code> argument,
and the second shall be passed as the <code>path2</code> argument. The
<code>filesystem_error</code> constructor's <code>error_code</code> argument
is set as appropriate for the specific operating system dependent error. <br>
</li>
<li para_num="8">Failure to allocate storage is reported by throwing an exception as described in
C++14
§17.6.5.12.<br>
</li>
<li para_num="9">Destructors throw nothing.</li>
</ul>
<p para_num="10">Functions having an argument of type <code>error_code&</code> report errors as follows, unless otherwise
specified:</p>
<ul>
<li para_num="11">If a call by the
implementation to an operating system or other underlying API results in an
error that prevents the function from meeting its specifications, the
<code>error_code&</code> argument is set as
appropriate for the specific operating system dependent error. Otherwise, <code>clear()</code>
is called on the
<code>error_code&</code> argument.</li>
</ul>
<h2>8 <a name="class-path">Class <code>path</code> [class.path]</a></h2>
<p para_num="1">An object of class <code>path</code> represents a path (<a href="#fs.def.path">4.15</a>)
and contains a pathname (<a href="#fs.def.pathname">4.16</a>). Such an object is concerned only with the lexical and syntactic aspects
of a path. The path does not necessarily exist in external storage, and the
pathname is not necessarily valid for the current operating
system or for a particular file system.</p>
<pre para_num="2">namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
class path
{
public:
typedef <b><i><a href="#value_type">see below</a></i></b> value_type;
typedef basic_string<value_type> string_type;
static constexpr value_type preferred_separator = <b><i><a href="#value_type">see below</a></i></b>;
// <a href="#path-constructors">constructors</a> and destructor
path() noexcept;
path(const path& p);
path(path&& p) noexcept;
template <class <a href="#Source">Source</a>>
path(const Source& source);
template <class InputIterator>
path(InputIterator first, InputIterator last);
template <class <a href="#Source">Source</a>>
path(const Source& source, const locale& loc);
template <class InputIterator>
path(InputIterator first, InputIterator last, const locale& loc);
~path();
// <a href="#path-assignments">assignments</a>
path& operator=(const path& p);
path& operator=(path&& p) noexcept;
template <class <a href="#Source">Source</a>>
path& operator=(const Source& source);
template <class <a href="#Source">Source</a>>
path& assign(const Source& source)
template <class InputIterator>
path& assign(InputIterator first, InputIterator last);
// <a href="#path-appends">appends</a>
path& operator/=(const path& p);
template <class <a href="#Source">Source</a>>
path& operator/=(const Source& source);
template <class <a href="#Source">Source</a>>
path& append(const Source& source);
template <class InputIterator>
path& append(InputIterator first, InputIterator last);
// <a href="#path-concatenation">concatenation</a>
path& operator+=(const path& x);
path& operator+=(const string_type& x);
path& operator+=(const value_type* x);
path& operator+=(value_type x);
template <class Source>
path& operator+=(const Source& x);
template <class EcharT>
path& operator+=(EcharT x);
template <class Source>
path& concat(const Source& x);
template <class InputIterator>
path& concat(InputIterator first, InputIterator last);
// <a href="#path-modifiers">modifiers</a>
void <a href="#path-clear">clear</a>() noexcept;
path& <a href="#path-make_preferred">make_preferred</a>();
path& <a href="#path-remove_filename">remove_filename</a>();
path& <a href="#replace_filename">replace_filename</a>(const path& replacement);
path& <a href="#path-replace_extension">replace_extension</a>(const path& replacement = path());
void <a href="#path-swap">swap</a>(path& rhs) noexcept;
// <a href="#path-native-format-observers">native format observers</a>
const string_type& <a href="#native">native</a>() const noexcept;
const value_type* <a href="#c_str">c_str</a>() const noexcept;
<a href="#operator-string_type">operator string_type</a>() const;
template <class EcharT, class traits = char_traits<EcharT>,
class Allocator = allocator<EcharT> >
basic_string<EcharT, traits, Allocator>
<a href="#string-template">string</a>(const Allocator& a = Allocator()) const;
std::string <a href="#string">string</a>() const;
std::wstring <a href="#wstring">wstring</a>() const;
std::string <a href="#u8string">u8string</a>() const;
std::u16string <a href="#u16string">u16string</a>() const;
std::u32string <a href="#u32string">u32string</a>() const;
// <a href="#path-generic-format-observers">generic format observers</a>
template <class EcharT, class traits = char_traits<EcharT>,
class Allocator = allocator<EcharT> >
basic_string<EcharT, traits, Allocator>
<a href="#generic_string-template">generic_string</a>(const Allocator& a = Allocator()) const;
std::string <a href="#generic_string">generic_string</a>() const;
std::wstring <a href="#generic_wstring">generic_wstring</a>() const;
std::string <a href="#generic_u8string">generic_u8string</a>() const;
std::u16string <a href="#generic_u16string">generic_u16string</a>() const;
std::u32string <a href="#generic_u32string">generic_u32string</a>() const;
// <a href="#path-compare">compare</a>
int <a href="#path-compare">compare</a>(const path& p) const noexcept;
int <a href="#path-compare">compare</a>(const string_type& s) const;
int <a href="#path-compare">compare</a>(const value_type* s) const;
// <a href="#path-decomposition">decomposition</a>
path <a href="#path-root_name">root_name</a>() const;
path <a href="#path-root_directory">root_directory</a>() const;
path <a href="#path-root_path">root_path</a>() const;
path <a href="#path-relative_path">relative_path</a>() const;
path <a href="#path-parent_path">parent_path</a>() const;
path <a href="#path-filename">filename</a>() const;