One of the biggest new features of C++17 is its <filesystem> library. This library, like many other major features of modern C++, originated in the Boost project. In 2015, it went into a standard technical specification to gather feedback, and finally, was merged into the C++17 standard with some changes based on that feedback.
In this chapter, you'll learn the following:
- How <filesystem> returns dynamically typed errors without throwing exceptions, and how you can too
- The format of a path, and the fundamentally incompatible positions of POSIX and Windows on the subject
- How to stat files and walk directories using portable C++17
- How to create, copy, rename, and remove files and directories
- How to fetch the free space of a filesystem