On Friday 18th January I’ve pushed another update for the book. This time I rewrote the whole chapter about std::filesystem. Please have a look at what changed and what are the plans.
The book got more than 25 new pages!
std::filesystem - Chapter Rewrite The book had a filesystem chapter from the start, but it was concise and didn’t contain much information.
Subtitle: Learning std::filesystem through file_size routines.
Last week I wrote a short post that explained how to use std::filesystem::file_size. Today I’d like to continue and show some significant differences that this new functionality has over the “older” techniques (like reading a file and getting its file position).
We’ll also learn something about permissions and how to manage them in std::filesystem.
Before C++17 we could often complain that even simple tasks as getting a file size were complicated. With std::filesystem things get a bit easier!
Get a File Size STL before C++17 didn’t contain any direct facilities to work with a filesystem. We could only use third party libraries (like Boost), or system APIs.