class for locating files
More...
#include <FilePathContainer.h>
class for locating files
Definition at line 32 of file FilePathContainer.h.
◆ PathList
◆ FilePathContainer() [1/2]
| agxIO::FilePathContainer::FilePathContainer |
( |
| ) |
|
◆ FilePathContainer() [2/2]
| agxIO::FilePathContainer::FilePathContainer |
( |
const agx::String & |
env | ) |
|
Constructor - set the file path found in given environment variable.
◆ ~FilePathContainer()
| agxIO::FilePathContainer::~FilePathContainer |
( |
| ) |
|
◆ addFilePath()
| void agxIO::FilePathContainer::addFilePath |
( |
const agx::String & |
path | ) |
|
Adds a list of paths to the end previous one.
- Parameters
-
| path | - string of paths each separated with PATH_DELIMITER |
◆ clear()
| void agxIO::FilePathContainer::clear |
( |
| ) |
|
◆ find()
First it will try to locate 'filename' in one of the specified directories.
Then it will search for it as 'filename' (current dir).
- Returns
- path to given filename if file exists in any directory
◆ getFilePathList() [1/2]
| PathList& agxIO::FilePathContainer::getFilePathList |
( |
| ) |
|
◆ getFilePathList() [2/2]
| const PathList& agxIO::FilePathContainer::getFilePathList |
( |
| ) |
const |
◆ pushbackPath()
| void agxIO::FilePathContainer::pushbackPath |
( |
const agx::String & |
path | ) |
|
Adds a filepath to the end of the list.
- Parameters
-
| path | - string of paths each separated with PATH_DELIMITER \ |
◆ pushfrontPath()
| void agxIO::FilePathContainer::pushfrontPath |
( |
const agx::String & |
path | ) |
|
Adds a filepath to the beginning of the list.
- Parameters
-
| path | - string of paths each separated with PATH_DELIMITER |
◆ removeFilePath()
| void agxIO::FilePathContainer::removeFilePath |
( |
const agx::String & |
path | ) |
|
Removes a list of paths.
- Parameters
-
| path | - string of paths each separated with PATH_DELIMITER |
◆ setFilePath()
| void agxIO::FilePathContainer::setFilePath |
( |
const agx::String & |
path | ) |
|
Set the file path directly.
Clear previously set data.
◆ setFilePathList()
Set the file path using a single string delimited with given delimiter.
- Parameters
-
| paths | - PATH_DELIMITER separated string with paths |
| clearPrevious | - clear previously added information to the path list of this instance |
| delimiter | - the delimiter (PATH_DELIMITER) defaults to the os where the code is compiled |
◆ setFromEnvironmentVariable()
| bool agxIO::FilePathContainer::setFromEnvironmentVariable |
( |
const agx::String & |
env, |
|
|
bool |
clearPrevious = true |
|
) |
| |
Set the file path found in given environment variable.
- Returns
- true if env var found
The documentation for this class was generated from the following file: