bool writeProcessedTime(const std::string& logFilePath, const std::string& time)
{
std::ofstream logFile(logFilePath, std::ios::out | std::ios::trunc);
if (logFile.is_open())
{
logFile << time << std::endl;
return true;
}
else
{
return false;
}
}
bool getProcessedTime(const std::string& logFilePath, std::string& time)
{
if (std::filesystem::exists(logFilePath))
{
std::ifstream logFile(logFilePath);
if (logFile.is_open())
{
std::getline(logFile, time);
return !time.empty();
}
else
{
return false;
}
}
else
{
return false;
}
}