Overview
This section deals with the filesystem library in C++17. We'll be looking at the new features of the filesystem one by one.
We'll cover the following
Filesystem Overview
While the Standard Library lacked some important features, you could always use Boost with its dozens of sub-libraries and do the work. The C++ Committee decided that the Boost libraries are so important that some of the systems were merged into the Standard. For example, smart pointers (although improved with the move semantics in C++11), regular expressions, std::optional
, std::any
and much more.
A similar story happened with std::filesystem
.
The filesystem library is modelled directly from Boost filesystem, which has been available since 2003 (with the version 1.30). In C++ implementation, the committee also extended the component with non-POSIX systems. The library was firstly available as TS (Technical Specification) and later, after a long time of improvements and feedback, merged into the C++17 Standard.
The library is located in the <filesystem>
header, and it uses namespace std::filesystem
.
Get hands-on with 1400+ tech skills courses.