15#include "auto_apms_util/filesystem.hpp"
26 std::ifstream file(path);
27 if (!file.is_open()) {
28 throw std::runtime_error(
"Couldn't open output file '" + path +
"' to check if it is empty.");
32 while (file.get(ch)) {
33 if (!std::isspace(
static_cast<unsigned char>(ch))) {
bool isFileEmpty(const std::string &path)
Determine if a file is empty.
Fundamental helper classes and utility functions.