You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
466 B
C++

#pragma once
#include <sstream>
#include <iomanip>
#include <numeric>
#include <algorithm>
#include <vector>
#include <filesystem>
static std::tuple<std::filesystem::path, std::filesystem::file_status, size_t> file_info(const std::filesystem::directory_entry& entry)
{
const auto fs (std::filesystem::status(entry));
return {entry.path(),
fs,
std::filesystem::is_regular_file(fs) ? std::filesystem::file_size(entry.path()) : 0u};
}