strusBase  0.17
fileLocatorInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_BASE_FILELOCATOR_INTERFACE_HPP_INCLUDED
11 #define _STRUS_BASE_FILELOCATOR_INTERFACE_HPP_INCLUDED
12 #include <string>
13 #include <vector>
14 
16 namespace strus
17 {
18 
22 {
23 public:
26 
29  virtual void addResourcePath( const std::string& path)=0;
30 
34  virtual std::string getResourceFilePath( const std::string& filename) const=0;
35 
38  virtual void defineWorkingDirectory( const std::string& workdir)=0;
39 
42  virtual std::string getWorkingDirectory() const=0;
43 
46  virtual std::vector<std::string> getResourcePaths() const=0;
47 };
48 
49 }//namespace
50 #endif
51 
Interface for locating resource files and working directory.
Definition: fileLocatorInterface.hpp:21
virtual std::vector< std::string > getResourcePaths() const =0
Get all resource paths.
virtual ~FileLocatorInterface()
Desructor.
Definition: fileLocatorInterface.hpp:25
virtual void addResourcePath(const std::string &path)=0
Declare a path for locating resource files.
virtual void defineWorkingDirectory(const std::string &workdir)=0
Define the working directory where to write files to.
virtual std::string getResourceFilePath(const std::string &filename) const =0
Get the absolute path of a resource file.
virtual std::string getWorkingDirectory() const =0
Get the current working directory, the root directory of files and directories written.