Class file_loader
zeep::http::file_loader — actual implementation of a zeep::resource_loader that loads files from disk
Synopsis
class file_loader : public zeep::http::resource_loader {
public:
file_loader(const std::filesystem::path & = ".");
virtual std::filesystem::file_time_type
file_time(const std::string &, std::error_code &) noexcept;
virtual std::istream *
load_file(const std::string &, std::error_code &) noexcept;
};
Description
Load the resources from the directory specified in the docroot constructor parameter.
file_loader
public
construct/copy/destruct
-
file_loader(const std::filesystem::path & docroot = ".");
constructor
Throws a runtime_error if the docroot does not exist
Parameters: |
docroot
|
Path to the directory where the 'resources' are located |
|
file_loader
public member functions
-
virtual std::filesystem::file_time_type
file_time(const std::string & file, std::error_code & ec) noexcept;
return last_write_time of file
-
virtual std::istream *
load_file(const std::string & file, std::error_code & ec) noexcept;
basic loader, returns error in ec if file was not found