FSResourceProvider.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../StreamResource/StreamResourceProvider.hpp"
5 #include <string>
6 
7 namespace iv
8 {
9 
13 {
14 public:
17 
18  FSResourceProvider( Instance * inst, size_t priority, const char * root_dir );
19 
20  // StreamResourceProvider
21  virtual void with_stream( ResourcePath const & path, std::function< void( std::istream & ) > const & ) const override;
22  virtual void with_metadata_stream( std::function< void( std::istream & ) > const & ) const override;
23 
24 private:
25  std::string toFsPath( ResourcePath path ) const;
26 
27 private:
28  std::string root;
29 };
30 
31 }