strusBase  0.17
Public Member Functions | List of all members
strus::FileLocatorInterface Class Referenceabstract

Interface for locating resource files and working directory. More...

#include <fileLocatorInterface.hpp>

Public Member Functions

virtual ~FileLocatorInterface ()
 Desructor. More...
 
virtual void addResourcePath (const std::string &path)=0
 Declare a path for locating resource files. More...
 
virtual std::string getResourceFilePath (const std::string &filename) const =0
 Get the absolute path of a resource file. More...
 
virtual void defineWorkingDirectory (const std::string &workdir)=0
 Define the working directory where to write files to. More...
 
virtual std::string getWorkingDirectory () const =0
 Get the current working directory, the root directory of files and directories written. More...
 
virtual std::vector< std::string > getResourcePaths () const =0
 Get all resource paths. More...
 

Detailed Description

Interface for locating resource files and working directory.

Constructor & Destructor Documentation

virtual strus::FileLocatorInterface::~FileLocatorInterface ( )
inlinevirtual

Desructor.

Member Function Documentation

virtual void strus::FileLocatorInterface::addResourcePath ( const std::string &  path)
pure virtual

Declare a path for locating resource files.

Parameters
[in]pathpath to add
virtual void strus::FileLocatorInterface::defineWorkingDirectory ( const std::string &  workdir)
pure virtual

Define the working directory where to write files to.

Parameters
[in]workdirdirectory path specifying the root directory of all files written
virtual std::string strus::FileLocatorInterface::getResourceFilePath ( const std::string &  filename) const
pure virtual

Get the absolute path of a resource file.

Parameters
[in]filenamename of the resource file
Returns
the full path of the file with the filename passed as argument
virtual std::vector<std::string> strus::FileLocatorInterface::getResourcePaths ( ) const
pure virtual

Get all resource paths.

Returns
the list of resource paths
virtual std::string strus::FileLocatorInterface::getWorkingDirectory ( ) const
pure virtual

Get the current working directory, the root directory of files and directories written.

Returns
the working directory

The documentation for this class was generated from the following file: