Summary
Here's a brief summary of what we have covered so far.
We'll cover the following
In this chapter, we dove into one of the biggest addition of C++17: std::filesystem
. You saw the core elements of the library: the path
class, directory_entry
and iterators and lots of supporting free functions.
Throughout the chapter, we also explored lots of examples: from simple cases like composing a path, getting file size, iterating through directories to even more complex: filtering with regex or creating temp directory structures.
Now, you should be equipped with solid knowledge about std::filesystem
and be prepared to explore the library on your own.
A few important links:
The full implementation of
std::filesystem
is described in the paper P0218: Adopt the File System TS for C++17. There are also others updates like P0317: Directory Entry Caching, P0430 – File system library on non-POSIX-like operating systems, P0492R2 - Resolution of C++17 National Body Comments, P0392 -Adapting string_view by filesystem pathsYou can find the final specification in C++17 draft - N4687: the “filesystem” section, 30.10.
Or under this online location timsong-cpp/filesystems.
We will conclude with compiler support, in the next lesson.
Get hands-on with 1400+ tech skills courses.