|Filesystem Release History|
|Home Tutorial Reference FAQ Releases Portability V3 Intro V3 Design Deprecated Bug Reports|
read_symlinkon Windows. This also affects other algorithms that involve
read_symlinkin their implementation. (PR#100, #85, #99, #123, #125)
read_symlinkon Windows could potentially fail or cause failures elsewhere with a sharing violation error, if the same symlink was opened concurrently. (#138)
is_symlink(directory_entry)would always return
false, even if the directory entry actually referred to a symlink. (PR#148)
is_directory(directory_entry, error_code&)). Removed incorrect
noexceptspecifications for the overloads not taking the
copy_fileimplementation has been updated to perform checks on the source and target files, as required by C++20 ([fs.op.copy.file]/4.1). In particular, the operation will fail if the source or target file is not a regular file or the source and target paths identify the same file.
copy_fileon POSIX systems will now also copy the source file permissions to the target file, if the target file is overwritten.
copy_fileimplementations based on
copy_file_rangesystem calls on Linux, which may improve file copying performance, especially on network filesystems.
copy_optionenumeration that is used with the
copy_fileoperation is deprecated. As a replacement, the new enum
copy_options(note the trailing 's') has been added. The new enum contains values similar to the
copy_optionsenum from C++20. The old enum values are mapped onto the new enum. The old enum will be removed in a future release.
copy_options::skip_existingoption, which allows
copy_fileoperation to succeed without overwriting the target file, if it exists.
copy_options::update_existingoption, which allows
copy_fileoperation to conditionally overwrite the target file, if it exists, if its last write time is older than that of the replacement file.
bool, which indicates whether the file was copied.
copyoperation has been extended and reworked to implement behavior specified in C++20 [fs.op.copy]. This includes support for
copy_options::create_hard_linksoptions. The operation performs additional checks based on the specified options. Applying
copyto a directory with default
copy_optionswill now also copy files residing in that directory (but not nested directories or files in those directories).
create_directoryoverload taking two paths. The second path is a path to an existing directory, which is used as a source of permission attributes to use in the directory to create.
copy_directoryoperation has been deprecated in favor of the new
create_directoryoverload. Note that the two operations have reversed order of the path arguments.
equivalenton POSIX systems now returns the actual error code from the OS if one of the paths does not resolve to a file. Previously the function would return an error code of 1. (#141)
equivalentno longer considers file size and last modification time in order to test whether the two paths refer to the same file. These checks could result in a false negative if the file was modified during the
current_path()as the default value of their arguments and also have an
error_codeargument will use the
current_path(error_code& ec)overload to obtain the current path, so that its failure is reported via the
error_codeargument instead of an exception.
spacenow initializes the
space_infostructure members to -1 values on error, as required by C++20 ([fs.op.space]/1).
spaceon Windows now accepts paths referring to arbitrary files, not only directories. This is similar to POSIX systems and corresponds to the operation description in C++20. (#73)
temp_directory_pathfor Windows CE. (PR#25)
unique_pathoperation based on
arc4random_buf(OpenBSD/FreeBSD/CloudABI) and BCrypt (Windows) system APIs.
file_statusand associated enums and functions to
operations.hppstill includes the new headers
BOOST_FILESYSTEM_NO_DEPRECATEDmacro is defined. These implicit includes are considered deprecated and will be removed in a future release. Users are encouraged to include the new headers directly or include
filesystem_errorexception is now implemented in the compiled library of Boost.Filesystem. Users may need to add linking with Boost.Filesystem library in their projects.
utimeis declared obsolete in POSIX.1-2008 and can be disabled e.g. in uClibc-ng. (PR#115)
directory_iteratoris now left in the end state on memory allocation errors.
directory_iteratoron POSIX systems, support for
readdir_rhas been reworked to avoid memory allocations for
readdiris used. This reduces memory consumption and eliminates the possibility of buffer overruns in case if
readdirproduces a very long directory name.
directory_optionsenum, which reflects the same named enum from C++20. The enum is supported in
recursive_directory_iteratorto customize iteration behavior. In particular, the iterators now support skipping directories that can't be opened due to insufficient permissions. The
symlink_optionenum is now deprecated and should be replaced with
recursive_directory_iteratoris now reset to the end state in case of errors, as required by C++20. (#112)
directory_options::pop_on_erroroption, which configures
recursive_directory_iteratorso that it attempts to recover from iteration errors by repeatedly invoking
pop()until it succeeds or the end state is reached. (#113)
directory_options::skip_dangling_symlinksoption, which configures
recursive_directory_iteratorso that it doesn't follow dangling directory symlinks and continues iteration instead of reporting an error.
recursive_directory_iteratorare now marked as deprecated:
no_push(). Users are advised to replace their use with the standard counterparts:
disable_recursion_pending(). Note that
recursion_pending()has the opposite meaning compared to
no_push_request(). Deprecated methods will be removed in a future release.
path::lexically_relative(and any dependent algorithms) to correctly handle empty, dot and dot-dot path elements in its argument. The behavior is made closer to C++17
std::path::lexically_relativein that empty and dot path elements are ignored and dot-dot path elements are accounted by decreasing the number of dot-dot path elements to generate in the resulting relative path. (#76)
error_codereturned from directory iterator increment when
path, fixed rvalue-aware
operator/return type to return an rvalue instead of rvalue reference. This fixes leaving a dangling reference in the user's code if the result of
operator/is bound to a const reference. (#110)
std::string::end()in path implementation.
read_symlinkimplementation to avoid possible memory exhaustion on broken or tampered with filesystems. The functions now have an internal limit of the path size they will accept from the OS, which is currently 16 MiB.
readdir_ron Linux and Android since the
readdirfunction is already thread-safe. (PR#68, #72)
boost::filesystem::copydue to undefined behavior in the implementation. (PR#71)
error_codeparameter should not throw on error. Thanks to ldqrk for pull request #42
space(p, ec). Thanks to cmuellner for pull request #39.
operations_testfailure on MinGW: MinGW defines __MINGW32__ rather than _MSC_VER, so also test for __MINGW32__ to see if setenv/unsetenv workaround needed.
generic() function name: The undocumented experimental class
path member function
generic() has been renamed
gives problems in C++/CLI. Unless the macro BOOST_FILESYSTEM_NO_DEPRECATED
is defined, the original
generic() will continue to be supplied
as a workaround for existing user code. But
deprecated. User code should migrate to the new name.
pathadds constexpr constants
dotof the type appropriate for the platform, and adds query functions
filename_is_dot_dot. These add convenience and the implementations may be more efficient that user coded equivalent functions.
recursive_directory_iteratorequality testing has existed more than a dozen years. Nowadays test driven development would likely have detected the problem in early development. Sigh.
create_directories()crashes when passed empty string as path, from Samantha Ritter. Also affected
create_directory(). Charles Olivi submitted a pull request with some particularly helpful test cases.
pathstem(), extension() member functions. Thanks to faithandbrave for pull request #31
push_directory()internal logic so it is easier to reason about.
noexceptsupplied as specified in the Filesystem TS if supported by the compiler.
size()function to class
path. Resolves #6874, Path should have a size() member function.
unique_pathby applying pull request #15 from Sebastian Redl. Also fixes #7506,
unique_pathFails on Windows for Temporary User Profiles.
recursive_directory_iterator: C++ turns an explicit constructor with all arguments except first defaulted into non-explicit single argument constructor.
Fix #11288, A patch to avoid redundant string allocations, by applying a patch submitted by Yevhen Ivannikov.
create_directories returns false if the path ends with a slash.
Also fix related issues if path contains dot or dot-dot
elements, and added test cases to the test suite.
Reference docs editorial cleanups: Use same style sheet as the rest of the documentation. Tweak tab font size. Fix excessively long lines in tables, synopsis.
filename()sections of the reference docs.
pathreverse iteration feature. The reference documentation has also been updated with a note warning about the limitations of class
temp_directory_path()doesn't return valid temp path on Android.
temp_directory_path()to (1) avoid
GetTempPath()failure if path length > 130 (ticket #5300) and (2) provide a more sensible sequence of directories than provided by
GetTempPath(), per boost list discussion "[filesystem] temp_directory_path() behavior on Windows". The new sequence is:
pathlocale and codecvt implementation for increased reliability. This change was SVN revision 83021, which should have gone into 1.56.0 but unfortunately the merge didn't happen until too late.
mklink /j link target". There is no plan for Boost.Filesystem to be able to create them directly other than by calling
recursive_directory_iterator::increment, adding an invariant that progress is always made, even if an error is reported by exception or error_code. Add a manually executed test,
test/issues/recurse_dir_iter_5403.cpp. Adjust regular regression tests as needed. Thanks to Claudio Bley for the pull request - the change was incorporated into the reorganized code. Fixes #5403 and #6821.
canonical()to treat parent of root as root. (Christian Hammerl) Fixes #9683 and #10187.
__sunmacro which is defined on Solaris 10. (Chris Stylianou)
const char colonto clear clang warning. (J?gen Hunold)
perms::perms_maskto absolute values to quiet intellisense warnings, and conform to C++11.
path::imbue()with portable code that is intended to be much more robust and maintainable. A section on path usage concerns has been added to the reference documentation describing several concerns that arise in the context of multithreading and
create_directories(":D"). The reported problem was a symptom of an internal bug that caused
path::parent_path()to fail on Windows for
path(":"), and that in turn caused other functions that depend on
parent_path()to fail, such as
constexpr value_type preferred_separatorto class path.
replace_extensiondoesn't work as specified in documentation. The documentation, implementation, and test cases have all had fixes applied. The documentation had failed to mention that any existing extension is removed. The behavior for simple cases has been reverted to the Version 2 behavior, but with corrections so that complex replacements now work. Two test cases from #5118 have been added.
comparefor consistency with std::string.
recursive_directory_iterator, allowing control over recursion into directory symlinks. Note that the default is changed to not recurse into directory symlinks.
Revised 07 August, 2017
© Copyright Beman Dawes, 2011
Use, modification, and distribution are subject to the Boost Software License, Version 1.0. See www.boost.org/LICENSE_1_0.txt