/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-02-21
* Changed:         2026-06-23
*
* */

#include <ls-std/core/exception/FileNotFoundException.hpp>
#include <ls-std/io/File.hpp>
#include <ls-std/io/evaluator/FileExistenceEvaluator.hpp>
#include <string>

using ls::standard::core::Class;
using ls::standard::core::FileNotFoundException;
using ls::standard::io::File;
using ls::standard::io::FileExistenceEvaluator;
using std::move;
using std::string;

FileExistenceEvaluator::FileExistenceEvaluator(string _filePath) : Class("FileExistenceEvaluator"), filePath(::move(_filePath))
{}

FileExistenceEvaluator::~FileExistenceEvaluator() noexcept = default;

void FileExistenceEvaluator::evaluate()
{
  if (!File{this->filePath}.exists())
  {
    const string message = "\"" + this->filePath + "\" does not exist!";
    throw FileNotFoundException{message};
  }
}
