std::filesystem in C++17 In Detail

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.

READ MORE...

std:filesystem::file_size Advantages and Differences

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.

READ MORE...

How to get File Size in C++?

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.

READ MORE...