## Class resource_loader

zeep::http::resource_loader — abstract base class for a resource loader

## Synopsis

    // In header: <zeep/http/template-processor.hpp>

    class resource_loader {
    public:
      // construct/copy/destruct
      resource_loader(const resource_loader &) = delete;
      resource_loader();
      resource_loader & operator=(const resource_loader &) = delete;
      ~resource_loader();

      // public member functions
      virtual std::filesystem::file_time_type
      file_time(const std::string &, std::error_code &) = 0;
      virtual std::istream * load_file(const std::string &, std::error_code &) = 0;
    };

## Description

A resource loader is used to fetch the resources a webapp can serve This is an abstract base class, use either file_loader to load files from a 'docroot' directory or rsrc_loader to load files from compiled in resources. (See https://github.com/mhekkel/mrc for more info on resources)

### `resource_loader` public construct/copy/destruct

1.     resource_loader(const resource_loader &) = delete;

2.     resource_loader();

3.     resource_loader & operator=(const resource_loader &) = delete;

4.     ~resource_loader();

### `resource_loader` public member functions

1.     virtual std::filesystem::file_time_type
       file_time(const std::string & file, std::error_code & ec) = 0;

   return last_write_time of file

2.     virtual std::istream *
       load_file(const std::string & file, std::error_code & ec) = 0;

   basic loader, returns error in ec if file was not found