From 5156746cd98d40fa2eaf49dc90d4fe41cf417402 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 18 Jan 2024 20:16:04 +0300 Subject: [PATCH] Partly restore documentation of the removed deprecated APIs. This partly restores documentation removed in 5df060e95ca844fe91b29001b4ae22bdb65635c6 and moves the features from "deprecated" table to a new "removed" table. This provides users with suggested replacements for the removed features. --- doc/deprecated.html | 222 ++++++++++++++++++++++++++++++++++++++- doc/release_history.html | 2 +- 2 files changed, 218 insertions(+), 6 deletions(-) diff --git a/doc/deprecated.html b/doc/deprecated.html index 2e276e0..81b4c9f 100644 --- a/doc/deprecated.html +++ b/doc/deprecated.html @@ -39,7 +39,7 @@ -

Deprecated names and features

+

Deprecated names and features

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. @@ -69,7 +69,7 @@ can be suppressed by defining BOOST_FILESYSTEM_ALLOW_DEPRECATED mac

Construction, assignment and appending from container types. - ✔ +  

Use string types or iterators as the source for path construction, assignment and appending. @@ -104,7 +104,7 @@ can be suppressed by defining BOOST_FILESYSTEM_ALLOW_DEPRECATED mac ✔ - Function removed + Function removed. Cache current_path() early in the application startup. @@ -114,10 +114,222 @@ can be suppressed by defining BOOST_FILESYSTEM_ALLOW_DEPRECATED mac   - No longer supported. When users are linking against static library of Boost.Filesystem, + 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. + all its dependencies. + + + +

Some library features were removed in one of the past releases. The table below lists some of +those features along with suggested replacements.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Component or location +

Removed name

+

Possible replacement

class pathbranch_path()parent_path()
class pathdirectory_string()string
class pathexternal_directory_string()native()
class pathexternal_file_string()native()
class pathfile_string()string()
class pathhas_branch_path()has_parent_path()
class pathhas_leaf()has_filename()
class pathis_complete()is_absolute()
class pathleaf()filename()
+ class path + native_directory_string() + string()
+ class path + native_file_string() + string()
+ class path + normalize() + Replace p.normalize() with p = p.lexically_normal().
+ class path +

remove_leaf()

+

remove_filename()

+ path.hpp + typedef basic_path<std::wstring, wpath_traits> wpath + class path
+ operations.hpp +

template <class Path>
+ Path complete(const Path& p,
+ const Path& base=
+   initial_path<Path>())

+

path absolute(const path& p, const path& base=
+  current_path())

+ operations.hpp + is_regular(file_status f) +

+ is_regular_file(file_status f)

+ operations.hpp + symbolic_link_exists(const path& ph) + Replace symbolic_link_exists(p) with is_symlink(symlink_status(p)).
+ operations.hpp + copy_directory(const path& from, const path& to) + create_directory(const path& to, const path& from). Note the reversed order of arguments.
+ class directory_entry + filename() + Replace de.filename() with de.path().filename().
+ class directory_entry + leaf() + Replace de.leaf() with de.path().filename().
+ class directory_entry + string() + Replace de.string() with de.path().string().
class recursive_directory_iteratorlevel()depth()
class recursive_directory_iteratorno_push_pending()!recursion_pending()
class recursive_directory_iteratorno_push()disable_recursion_pending()
directory.hppenum class symlink_optionUse corresponding values of enum class directory_options instead.
+ directory.hpp + wrecursive_directory_iterator typedef + class recursive_directory_iterator.
+ operations.hpp + The header provides filesystem_error, file_status, directory_entry, directory_iterator, recursive_directory_iterator and associated enums and functions. + Explicitly include headers exception.hpp, file_status.hpp and/or directory.hpp to introduce the required components.
+ path_traits.hpp + The header contained implementation details of class path. + Remove the include.
+ convenience.hpp + The header contained helper functions that were deprecated and then removed. + Remove the include.
diff --git a/doc/release_history.html b/doc/release_history.html index 77cb073..5f42063 100644 --- a/doc/release_history.html +++ b/doc/release_history.html @@ -49,7 +49,7 @@
  • weakly_canonical now produces an absolute path if the input path is relative and contains no elements that exist in the filesystem. (#300)
  • Added a new copy_options::ignore_attribute_errors option for copy_file and copy operations. The new option allows to ignore possible errors while copying file attributes. (#179)
  • On Linux, copy_file backends based on sendfile and copy_file_range system calls will attempt to preallocate storage for the target file. This may reduce filesystem fragmentation and provide early error indication if there is not enough free space. Not all filesystems support this feature; file copying proceeds if storage preallocation is not supported.
  • -
  • Removed APIs that were previously declared deprecated. In particular, path and recursive_directory_iterator member functions, is_regular, copy_directory, symbolic_link_exists, complete, copy_option, symlink_option, as well as boost/filesystem/convenience.hpp and boost/filesystem/path_traits.hpp headers were removed.
  • +
  • Removed APIs that were previously declared deprecated. In particular, path and recursive_directory_iterator member functions, is_regular, copy_directory, symbolic_link_exists, complete, copy_option, symlink_option, as well as boost/filesystem/convenience.hpp and boost/filesystem/path_traits.hpp headers were removed. Possible replacements for the removed components are mentioned in Deprecated names and features section.
  • Support for path construction, assignment and appending from container types (e.g. std::vector<char>) is now disabled by default. Users can still enable this functionality by defining BOOST_FILESYSTEM_DEPRECATED. This functionality remains deprecated and will be completely removed in a future release.