FileExistenceEvaluator.hpp 1017 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-21
  6. * Changed: 2024-09-13
  7. *
  8. * */
  9. #ifndef LS_STD_FILE_EXISTENCE_EVALUATOR_HPP
  10. #define LS_STD_FILE_EXISTENCE_EVALUATOR_HPP
  11. #include <ls-std/core/Class.hpp>
  12. #include <ls-std/core/interface/IEvaluator.hpp>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. #include <string>
  15. /*
  16. * @doc: class(name: 'FileExistenceEvaluator', package: 'io')
  17. * @doc: io.FileExistenceEvaluator.description('This class evaluates whether a file exists and throws an exception in case it does not.')
  18. * */
  19. namespace ls::std::io
  20. {
  21. class LS_STD_DYNAMIC_GOAL FileExistenceEvaluator : public ls::std::core::Class, public ls::std::core::interface_type::IEvaluator
  22. {
  23. public:
  24. explicit FileExistenceEvaluator(::std::string _filePath);
  25. ~FileExistenceEvaluator() noexcept override;
  26. void evaluate() override;
  27. private:
  28. ::std::string filePath{};
  29. };
  30. }
  31. #endif