fenbf / cppstories-discussions

4 stars 1 forks source link

2019/01/filesizeadvantages/ #103

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

std:filesystem::file_size Advantages and Differences - C++ Stories

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.

https://www.cppstories.com/2019/01/filesizeadvantages/

TomLeroc commented 1 year ago

I think there's a problem with your directory_entry test code. I think you should be constructing the directory entry each time, and not simply calling the file_size method.