|
MaterialX 1.38.2
|
A sequence of file paths, which may be queried to find the first instance of a given filename on the file system. More...
#include <File.h>
Public Types | |
| using | Iterator = FilePathVec::iterator |
| using | ConstIterator = FilePathVec::const_iterator |
Public Member Functions | |
| FileSearchPath (const string &searchPath, const string &sep=PATH_LIST_SEPARATOR) | |
| Construct a search path from a string. More... | |
| string | asString (const string &sep=PATH_LIST_SEPARATOR) const |
| Convert this sequence to a string using the given separator. | |
| void | append (const FilePath &path) |
| Append the given path to the sequence. | |
| void | append (const FileSearchPath &searchPath) |
| Append the given search path to the sequence. | |
| void | prepend (const FilePath &path) |
| Prepend the given path to the sequence. | |
| void | clear () |
| Clear all paths from the sequence. | |
| size_t | size () const |
| Return the number of paths in the sequence. | |
| bool | isEmpty () const |
| Return true if the search path is empty. | |
| FilePath & | operator[] (size_t index) |
| Return the path at the given index. | |
| const FilePath & | operator[] (size_t index) const |
| Return the const path at the given index. | |
| FilePath | find (const FilePath &filename) const |
| Given an input filename, iterate through each path in this sequence, returning the first combined path found on the file system. More... | |
Iterators | |
| Iterator | begin () |
| ConstIterator | begin () const |
| Iterator | end () |
| ConstIterator | end () const |
A sequence of file paths, which may be queried to find the first instance of a given filename on the file system.
|
inline |
Construct a search path from a string.
| searchPath | A string containing a sequence of file paths joined by separator characters. |
| sep | The set of separator characters used in the search path. Defaults to the PATH_LIST_SEPARATOR character. |
Given an input filename, iterate through each path in this sequence, returning the first combined path found on the file system.
On success, the combined path is returned; otherwise the original filename is returned unmodified.