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.

26 lines
649 B
C++

#pragma once
#include <sstream>
#include <iomanip>
#include <numeric>
#include <algorithm>
#include <vector>
#include <filesystem>
namespace filepath
{
static std::tuple<std::filesystem::path, std::filesystem::file_status> getFileInfo(const std::filesystem::directory_entry& entry)
{
const auto file_status (std::filesystem::status(entry));
return {entry.path(), file_status};
}
static bool endsWith(const std::string& string, const std::string& ending)
{
if (ending.size() > string.size())
return false;
return std::equal(ending.rbegin(), ending.rend(), string.rbegin());
}
}