|
AGXDynamics
2.31.1.0
|
class for locating files More...
#include <FilePathContainer.h>
Public Types | |
| typedef agx::List< agx::String > | PathList |
Public Member Functions | |
| FilePathContainer () | |
| Constructor. More... | |
| FilePathContainer (const agx::String &env) | |
| Constructor - set the file path found in given environment variable. More... | |
| ~FilePathContainer () | |
| Destructor. More... | |
| void | addFilePath (const agx::String &path) |
| Adds a list of paths to the end previous one. More... | |
| void | clear () |
| Clear all added path. More... | |
| agx::String | find (const agx::String &filename) const |
| First it will try to locate 'filename' in one of the specified directories. More... | |
| PathList & | getFilePathList () |
| const PathList & | getFilePathList () const |
| void | pushbackPath (const agx::String &path) |
| Adds a filepath to the end of the list. More... | |
| void | pushfrontPath (const agx::String &path) |
| Adds a filepath to the beginning of the list. More... | |
| void | removeFilePath (const agx::String &path) |
| Removes a list of paths. More... | |
| void | setFilePath (const agx::String &path) |
| Set the file path directly. More... | |
| void | setFilePathList (const agx::String &paths, bool clearPrevious=true, const agx::String &delimiter=agxIO::FileSystem::PATH_DELIMITER) |
| Set the file path using a single string delimited with given delimiter. More... | |
| bool | setFromEnvironmentVariable (const agx::String &env, bool clearPrevious=true) |
| Set the file path found in given environment variable. More... | |
class for locating files
Definition at line 32 of file FilePathContainer.h.
Definition at line 36 of file FilePathContainer.h.
| agxIO::FilePathContainer::FilePathContainer | ( | ) |
Constructor.
| agxIO::FilePathContainer::FilePathContainer | ( | const agx::String & | env | ) |
Constructor - set the file path found in given environment variable.
| agxIO::FilePathContainer::~FilePathContainer | ( | ) |
Destructor.
| void agxIO::FilePathContainer::addFilePath | ( | const agx::String & | path | ) |
Adds a list of paths to the end previous one.
| path | - string of paths each separated with PATH_DELIMITER |
| void agxIO::FilePathContainer::clear | ( | ) |
Clear all added path.
| agx::String agxIO::FilePathContainer::find | ( | const agx::String & | filename | ) | const |
First it will try to locate 'filename' in one of the specified directories.
Then it will search for it as 'filename' (current dir).
| PathList& agxIO::FilePathContainer::getFilePathList | ( | ) |
| const PathList& agxIO::FilePathContainer::getFilePathList | ( | ) | const |
| void agxIO::FilePathContainer::pushbackPath | ( | const agx::String & | path | ) |
Adds a filepath to the end of the list.
| path | - string of paths each separated with PATH_DELIMITER \ |
| void agxIO::FilePathContainer::pushfrontPath | ( | const agx::String & | path | ) |
Adds a filepath to the beginning of the list.
| path | - string of paths each separated with PATH_DELIMITER |
| void agxIO::FilePathContainer::removeFilePath | ( | const agx::String & | path | ) |
Removes a list of paths.
| path | - string of paths each separated with PATH_DELIMITER |
| void agxIO::FilePathContainer::setFilePath | ( | const agx::String & | path | ) |
Set the file path directly.
Clear previously set data.
| void agxIO::FilePathContainer::setFilePathList | ( | const agx::String & | paths, |
| bool | clearPrevious = true, |
||
| const agx::String & | delimiter = agxIO::FileSystem::PATH_DELIMITER |
||
| ) |
Set the file path using a single string delimited with given delimiter.
| 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 |
| bool agxIO::FilePathContainer::setFromEnvironmentVariable | ( | const agx::String & | env, |
| bool | clearPrevious = true |
||
| ) |
Set the file path found in given environment variable.