|  | Filesystem Deprecated Features | 
| Home Tutorial Reference FAQ Releases Portability V4 V3 Intro V3 Design Deprecated Bug Reports | 
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 
BOOST_FILESYSTEM_NO_DEPRECATED, and this is recommended for all new code.
In the table, ✔ indicates a synonym or other
workaround is provided unless 
BOOST_FILESYSTEM_NO_DEPRECATED is defined.
| Component or location | Old name, now deprecated | ✔ | New name | 
| class path | branch_path() | ✔ | parent_path() | 
| class path | canonize() | Function removed | |
| class path | default_name_check() | ✔ | Function removed | 
| class path | default_name_check(name_check) | ✔ | Function removed | 
| class path | default_name_check_writable() | ✔ | Function removed | 
| class path | directory_string() | ✔ | string | 
| class path | external_directory_string() | ✔ | native() | 
| class path | external_file_string() | ✔ | native() | 
| class path | file_string() | ✔ | string() | 
| class path | has_branch_path() | ✔ | has_parent_path() | 
| class path | has_leaf() | ✔ | has_filename() | 
| class path | is_complete() | ✔ | is_absolute() | 
| class path | leaf() | ✔ | filename() | 
| class path | native_directory_string() | ✔ | string() | 
| class path | native_file_string() | ✔ | string() | 
| class path | normalize() | ✔ | Function removed | 
| class path | path(const string_type& str, name_check) | ✔ | Function removed. Workaround ignores name_checkargument. | 
| class path | path(const string_type::value_type* s,  name_check) | ✔ | Function removed. Workaround ignores name_checkargument. | 
| class path | 
 | ✔ | 
 | 
| path.hpp | template<class String, class Traits> | Class template basic_pathis replaced by classpath.
    No workaround for an explicitly codedbasic_pathis provided,
    but see the next row -path. | |
| path.hpp | typedef basic_path<std::string, path_traits> path | ✔ | class path | 
| path.hpp | typedef basic_path<std::wstring, wpath_traits> wpath | ✔ | Removed; use class pathinstead. Workaround providestypedef path wpath | 
| operations.hpp | initial_path() | ✔ | Function removed | 
| operations.hpp | 
 | ✔ | 
 | 
| operations.hpp | is_regular(file_status f) | ✔ | 
     | 
| operations.hpp | symbolic_link_exists(const path& ph) | Function removed | |
| operations.hpp | copy_directory(const path& from, const path& to) | Function removed, use create_directory(const path& to, const path& from)instead (note the reversed order of arguments) | |
| class directory_entry | filename() | ✔ | Function removed, use path().filename()instead. | 
| class directory_entry | leaf() | ✔ | Function removed, use path().filename()instead. | 
| class directory_entry | string() | ✔ | Function removed, use path().string()instead. | 
| class recursive_directory_iterator | level() | ✔ | depth() | 
| class recursive_directory_iterator | no_push_pending() | ✔ | !recursion_pending() | 
| class recursive_directory_iterator | no_push() | ✔ | disable_recursion_pending() | 
| directory.hpp | enum class symlink_option | ✔ | Removed; use corresponding values of enum class directory_optionsinstead. | 
| directory.hpp | wrecursive_directory_iteratortypedef | ✔ | Removed; use class recursive_directory_iteratorinstead. Workaround providestypedef recursive_directory_iterator wrecursive_directory_iterator | 
| operations.hpp | The header provides filesystem_error,file_status,directory_entry,directory_iterator,recursive_directory_iteratorand associated enums and functions. | ✔ | These components were moved to separate headers exception.hpp,file_status.hppanddirectory.hpp.
    The workaround is to include the new headers orfilesystem.hpp. The new headers are still included byoperations.hppifBOOST_FILESYSTEM_NO_DEPRECATEDis not defined. | 
| Macro definitions | BOOST_WINDOW_API | No longer supported; API selection is always automatic. | |
| Macro definitions | BOOST_POSIX_API | No longer supported; API selection is always automatic. | |
| Macro definitions | BOOST_WINDOW_PATH | No longer supported; native path format selection is always automatic. | |
| Macro definitions | BOOST_POSIX_PATH | No longer supported; native path format selection is always automatic. | |
| Build system | Auto-linking on Windows | 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. | 
initial_path functionFull implementation of initial_path() would require
support from the C++ runtime startup code, and that doesn't seem likely to
happen. Depending on the user to call initial_path() at the
beginning of main() is too error prone.  An equivalent
function can trivially be provided by a user.
© Copyright Beman Dawes, 2002-2005, 2010
© Copyright Andrey Semashev, 2019-2021
Use, modification, and distribution are subject to the Boost Software License, Version 1.0. See www.boost.org/LICENSE_1_0.txt