deprecated.html
20.5 KB
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
<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>Filesystem Deprecated Features</title>
<link href="styles.css" rel="stylesheet">
</head>
<body>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="277">
<a href="../../../index.htm">
<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="300" height="86" border="0"></a></td>
<td align="middle">
<font size="7">Filesystem Deprecated Features</font>
</td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
<td><a href="index.htm">Home</a>
<a href="tutorial.html">Tutorial</a>
<a href="reference.html">Reference</a>
<a href="faq.htm">FAQ</a>
<a href="release_history.html">Releases</a>
<a href="portability_guide.htm">Portability</a>
<a href="v4.html">V4</a>
<a href="v3.html">V3 Intro</a>
<a href="v3_design.html">V3 Design</a>
<a href="deprecated.html">Deprecated</a>
<a href="issue_reporting.html">Bug Reports </a>
</td>
</table>
<h2><a name="Deprecated-names">Deprecated names</a> and features</h2>
<p style="font-size: 10pt">As the library evolves over time, names sometimes
change or old features are removed to make way for new features. To ease transition, Boost.Filesystem deprecates
the old names and features, but by default continues to provide many of them.
The deprecated names and other workarounds can be suppressed by defining macro <code>
BOOST_FILESYSTEM_NO_DEPRECATED</code>, and this is recommended for all new code.</p>
<p style="font-size: 10pt">In the table, ✔ indicates a synonym or other
workaround is provided unless <code>
BOOST_FILESYSTEM_NO_DEPRECATED</code> is defined.</p>
<p style="font-size: 10pt">Additionally, when not disabled, most of the deprecated components will generate
compilation warnings when used. These warnings are intended to highlight the library usage that
needs to be updated. For convenience during the transition period, these warnings
can be suppressed by defining <code>BOOST_FILESYSTEM_ALLOW_DEPRECATED</code> macro.</p>
<table border="1" cellpadding="5" cellspacing="1" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td style="font-size: 10pt" valign="top">
<b><i>Component or location</i></b></td>
<td style="font-size: 10pt" valign="top">
<p style="font-size: 10pt"><b><i>Old name, now deprecated</i></b></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<p style="font-size: 10pt"><b><i>New name</i></b></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>branch_path()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>parent_path()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>canonize()</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>default_name_check()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>default_name_check(name_check)</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>default_name_check_writable()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>directory_string()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>string</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>external_directory_string()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>native()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>external_file_string()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>native()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>file_string()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>string()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>has_branch_path()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>has_parent_path()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>has_leaf()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>has_filename()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>is_complete()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>is_absolute()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class path</code></td>
<td style="font-size: 10pt" valign="top"><code>leaf()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>filename()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>native_directory_string()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<code>string()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>native_file_string()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<code>string()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>normalize()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>path(const string_type& str, name_check)</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed. Workaround ignores </i><code>name_check</code><i>
argument.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<code>path(const string_type::value_type* s, name_check)</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed. Workaround ignores </i><code>name_check</code><i>
argument.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<p style="font-size: 10pt"><code>remove_leaf()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<p style="font-size: 10pt"><code>remove_filename()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
<td style="font-size: 10pt" valign="top">
<p style="font-size: 10pt">Construction, assignment and appending from container types.</td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<p style="font-size: 10pt">Use string types or iterators as the source for path construction, assignment and appending.</td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>path.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>template<class String, class Traits><br>
class basic_path;</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
Class template <code>basic_path</code> is replaced by class <code>path</code>.
No workaround for an explicitly coded <code>basic_path</code> is provided,
but see the next row - <code>path</code>.</td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>path.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>typedef basic_path<std::string, path_traits> path</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<code>class path</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>path.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>typedef basic_path<std::wstring, wpath_traits> wpath</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Removed; use </i><code>class path</code><i> instead. Workaround provides
</i><code>typedef path wpath</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>operations.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>initial_path()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>operations.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<p dir="ltr"><code>template <class Path><br>
Path complete(const Path& p,<br>
const Path& base=<br>
initial_path<Path>())</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<p dir="ltr"><code>path absolute(const path& p, const path& base=<br>
current_path())</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>operations.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>is_regular(file_status f)</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<p dir="ltr">
<code>is_regular_file(file_status f)</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>operations.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>symbolic_link_exists(const path& ph)</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>operations.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>copy_directory(const path& from, const path& to)</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed, use <code>create_directory(const path& to, const path& from)</code> instead (note the reversed order of arguments)</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class directory_entry</code></td>
<td style="font-size: 10pt" valign="top">
<code>filename()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed, use </i><code>path().filename()</code><i> instead.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class directory_entry</code></td>
<td style="font-size: 10pt" valign="top">
<code>leaf()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed, use </i><code>path().filename()</code><i> instead.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>class directory_entry</code></td>
<td style="font-size: 10pt" valign="top">
<code>string()</code></td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Function removed, use </i><code>path().string()</code><i> instead.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class recursive_directory_iterator</code></td>
<td style="font-size: 10pt" valign="top"><code>level()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>depth()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class recursive_directory_iterator</code></td>
<td style="font-size: 10pt" valign="top"><code>no_push_pending()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>!recursion_pending()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>class recursive_directory_iterator</code></td>
<td style="font-size: 10pt" valign="top"><code>no_push()</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><code>disable_recursion_pending()</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top"><code>directory.hpp</code></td>
<td style="font-size: 10pt" valign="top"><code>enum class symlink_option</code></td>
<td style="font-size: 10pt" valign="top">✔</td>
<td style="font-size: 10pt" valign="top"><i>Removed; use corresponding values of </i><code>enum class directory_options</code><i> instead.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>directory.hpp</code></td>
<td style="font-size: 10pt" valign="top">
<code>wrecursive_directory_iterator</code> typedef</td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>Removed; use </i><code>class recursive_directory_iterator</code><i> instead. Workaround provides
</i><code>typedef recursive_directory_iterator wrecursive_directory_iterator</code></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>operations.hpp</code></td>
<td style="font-size: 10pt" valign="top">
The header provides <code>filesystem_error</code>, <code>file_status</code>, <code>directory_entry</code>, <code>directory_iterator</code>, <code>recursive_directory_iterator</code> and associated enums and functions.</td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>These components were moved to separate headers </i><code>exception.hpp</code><i>, </i><code>file_status.hpp</code><i> and </i><code>directory.hpp</code><i>.
The workaround is to include the new headers or </i><code>filesystem.hpp</code><i>. The new headers are still included by </i><code>operations.hpp</code><i> if
</i><code>BOOST_FILESYSTEM_NO_DEPRECATED</code><i> is not defined.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>string_file.hpp</code></td>
<td style="font-size: 10pt" valign="top">
The header provides utility functions for loading and saving a string to/from file.</td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>The header is deprecated, use a different implementation of these functions. Unavailable if </i><code>BOOST_FILESYSTEM_NO_DEPRECATED</code><i> is defined and will be permanently removed in a future release.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
<code>path_traits.hpp</code></td>
<td style="font-size: 10pt" valign="top">
The header contains implementation details of class <code>path</code>.</td>
<td style="font-size: 10pt" valign="top">
✔</td>
<td style="font-size: 10pt" valign="top">
<i>The header is deprecated and should not be used in user's code. Unavailable if </i><code>BOOST_FILESYSTEM_NO_DEPRECATED</code><i> is defined and will be permanently removed in a future release.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
Macro definitions</td>
<td style="font-size: 10pt" valign="top">
<code>BOOST_WINDOW_API</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>No longer supported; API selection is always automatic.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
Macro definitions</td>
<td style="font-size: 10pt" valign="top">
<code>BOOST_POSIX_API</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>No longer supported; API selection is always automatic.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
Macro definitions</td>
<td style="font-size: 10pt" valign="top">
<code>BOOST_WINDOW_PATH</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>No longer supported; native path format selection is always automatic.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
Macro definitions</td>
<td style="font-size: 10pt" valign="top">
<code>BOOST_POSIX_PATH</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>No longer supported; native path format selection is always automatic.</i></td>
</tr>
<tr>
<td style="font-size: 10pt" valign="top">
Build system</td>
<td style="font-size: 10pt" valign="top">
<code>Auto-linking on Windows</code></td>
<td style="font-size: 10pt" valign="top">
</td>
<td style="font-size: 10pt" valign="top">
<i>No longer supported. When users are linking against static library of Boost.Filesystem,
they are recommended to explicitly add Boost.Filesystem dependencies to their linker command
line. Shared library of Boost.Filesystem is not affected by this as it is already linked with
all its dependencies.</i></td>
</tr>
</table>
<h2>Deprecation rationale</h2>
<h3><code>initial_path</code> function</h3>
<p dir="ltr">Full implementation of <code>initial_path()</code> would require
support from the C++ runtime startup code, and that doesn't seem likely to
happen. Depending on the user to call <code>initial_path()</code> at the
beginning of <code>main()</code> is too error prone. An equivalent
function can trivially be provided by a user.</p>
<hr>
<p>© Copyright Beman Dawes, 2002-2005, 2010</p>
<p>© Copyright Andrey Semashev, 2019-2021</p>
<p> Use, modification, and distribution are subject to the Boost Software
License, Version 1.0. See <a href="http://www.boost.org/LICENSE_1_0.txt">
www.boost.org/LICENSE_1_0.txt</a></p>
</body>
</html>