27.9 “filesystem”
The <filesystem> header deals less with the contents of files and more with files as a whole and their relationship to each other. Since C++17, it has been part of the standard; previously, it was extensively tested in Boost.Filesystem.
All components of the header are located in the std::filesystem namespace. The most important components are as follows:
-
Class pathRepresents the name of a file or directory. A path can be easily converted into a string or, starting from C++20, into a u8string. With append, you add a path component; with concat, you modify the last path component.
-
Class directory_entryContains metadata about a file or directory.
-
Classes directory_iterator and recursive_directory_iteratorAllow iterating ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access