You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added BOOST_FILESYSTEM_VERSION 4 and moved breaking path changes to v4.
Boost.Filesystem v4 will contain breaking changes from v3 that are required
for better compatibility with C++17 std::filesystem. It will also remove
the deprecated features of v3.
Updated docs to reflect the differences between v3 and v4. Updated tests
to verify both v3 and v4 where the differences are present.
<li><b>Introducing Boost.Filesystem v4.</b> This new version of the library removes all deprecated features of v3 and also makes a number of breaking API changes intended to make Boost.Filesystem more compatible with std::filesystem introduced in C++17. The differences are described in the release notes and documentation using <b>v3</b> and <b>v4</b> tags and are also summarised in a <ahref="v4.html">separate section</a>. Users can select Boost.Filesystem version by defining <code>BOOST_FILESYSTEM_VERSION</code> macro to either 3 or 4 when compiling their code. There is no need to separately compile Boost.Filesystem for each library version — a single binary supports both v3 and v4. Users should avoid using both v3 and v4 in the same application as this can lead to subtle bugs. Currently, v3 is the default. In a future release v4 will become the default, and eventually v3 will be removed. v4 is functional, but it is still a work in progress and there may be breaking API changes in the future.</li>
45
+
<li><b>v4:</b><code>path::filename</code>, <code>path::stem</code> and <code>path::extension</code> no longer consider root name or root directory of the path as a filename if the path only consists of those components. For example, on Windows <code>path("C:").filename()</code> used to return "C:" and <code>path("C:\").filename()</code> used to return "\" and both will return an empty path now. (<ahref="https://github.com/boostorg/filesystem/issues/88">#88</a>, <ahref="https://github.com/boostorg/filesystem/issues/194">#194</a>)</li>
46
+
<li><b>v4:</b><code>path::stem</code> and <code>path::extension</code> no longer treat a filename that starts with a dot and has no other dots as an extension. Filenames starting with a dot are commonly treated as filenames with an empty extension. The leading dot is used to indicate a hidden file on most UNIX-like systems. (<ahref="https://github.com/boostorg/filesystem/issues/88">#88</a>)</li>
47
+
<li><b>New:</b> Improved support for various path prefixes on Windows. Added support for local device prefix ("\\.\") and experimental support for NT path prefix ("\??\"). The prefixes will be included in the root name of a path. Note that using the prefixes with Boost.Filesystem v3 can lead to surprising results (e.g. <code>path("\\\\.\\").stem() == "\\\\"</code>). It is recommended to use the prefixes only with Boost.Filesystem v4.</li>
48
+
<li>Reworked <code>path::lexically_normal</code> implementation to eliminate some cases of duplicate dot (".") elements in the normalized paths.</li>
43
49
<li><b>New:</b> Added support for disabling usage of various system APIs at library build time. This can be useful when a certain API is detected as present by the library configuration scripts but must not be used for some reason (for example, when it is known to fail on the target system). See the description of <ahref="index.htm#Macros">configuration macros</a> for more details.</li>
44
50
<li><b>New:</b> Added <code>copy_options::synchronize_data</code> and <code>copy_options::synchronize</code> options for the <code>copy_file</code> operation. These options allow to synchronize the written data and attributes with the permanent storage. These options are expensive in terms of performance, but allow to ensure reliability of the copied data. Note that <code>copy_file</code> performed implicit data synchronization on POSIX systems since Boost.Filesystem 1.74.0. This release adds support for more platforms and disables data synchronization by default while allowing the caller to explicitly request it. (<ahref="https://github.com/boostorg/filesystem/issues/186">#186</a>)</li>
45
51
<li>Added handling of <code>EINTR</code> error code on POSIX systems for some system calls issued internally. In particular, <code>EINTR</code> could have been ignored on <code>close</code>, which on HP-UX would result in a leaked file descriptor.</li>
@@ -52,11 +58,7 @@ <h2>1.77.0</h2>
52
58
<li>In <code>canonical</code>, added a limit for the maximum number of symlinks that can be resolved during the call. The limit is currently at least 40 symlinks.</li>
53
59
<li>On Windows, <code>canonical</code> and <code>weakly_canonical</code> will now use <code>path::preferred_separator</code> for the root directory separator in the resulting paths. This fixes "file not found" errors caused by Windows API not handling generic separators in UNC paths and paths that start with the Win32 filesystem prefix ("\\?\"). (<ahref="https://github.com/boostorg/filesystem/issues/87">#87</a>, <ahref="https://github.com/boostorg/filesystem/issues/187">#187</a>)</li>
54
60
<li><b>New:</b> Added <code>weakly_canonical</code> overloads taking <code>base</code> path as an argument.</li>
55
-
<li><b>Breaking change:</b><code>path::filename</code>, <code>path::stem</code> and <code>path::extension</code> no longer consider root name or root directory of the path as a filename if the path only consists of those components. For example, on Windows <code>path("C:").filename()</code> used to return "C:" and <code>path("C:\").filename()</code> used to return "\" and both will return an empty path now. (<ahref="https://github.com/boostorg/filesystem/issues/88">#88</a>, <ahref="https://github.com/boostorg/filesystem/issues/194">#194</a>)</li>
56
-
<li><b>Breaking change:</b><code>path::stem</code> and <code>path::extension</code> no longer treat a filename that starts with a dot and has no other dots as an extension. Filenames starting with a dot are commonly treated as filenames with an empty extension. The leading dot is used to indicate a hidden file on most UNIX-like systems. (<ahref="https://github.com/boostorg/filesystem/issues/88">#88</a>)</li>
57
-
<li><b>New:</b> Improved support for various path prefixes on Windows. Added support for local device prefix ("\\.\") and experimental support for NT path prefix ("\??\"). The prefixes will be included in the root name of a path.</li>
58
61
<li>In <code>read_symlink</code> on Windows, corrected reparse point handling. The operation would return an empty path for some mount points (for example, created by <ahref="https://www.box.com/">Box</a> cloud storage driver) and directory junction points that had empty print names. The new implementation now parses substitute name of the reparse point and attempts to reconstruct a Win32 path from it. (<ahref="https://github.com/boostorg/filesystem/issues/187">#187</a>)</li>
59
-
<li>Reworked <code>path::lexically_normal</code> implementation to eliminate some cases of duplicate dot (".") elements in the normalized paths.</li>
60
62
<li>On Windows, file streams provided in <code>boost/filesystem/fstream.hpp</code> will use wide character paths on libc++ versions 7.0 and higher, when the standard library supports opening files with wide character paths. (<ahref="https://github.com/boostorg/filesystem/issues/181">#181</a>)</li>
61
63
<li>On Windows, creating symlinks should no longer require elevated privileges, if Windows is configured in <ahref="https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development">Developer mode</a>.</li>
0 commit comments