467 lines
19 KiB
HTML
Executable file
467 lines
19 KiB
HTML
Executable file
<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>
|
|
<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>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">
|
|
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>
|