An iterator to walk through a semicolon delimited list of file paths. More...
#include <BeFileListIterator.h>
Public Member Functions | |
BeFileListIterator (WCharCP filePathList, bool recursive) | |
Construct an instance of a BeFileListIterator. More... | |
BeFileListIterator (WStringCR filePathList, bool recursive) | |
Construct an instance of a BeFileListIterator. More... | |
BeFileListIterator (CharCP filePathList, bool recursive) | |
Construct an instance of a BeFileListIterator. More... | |
~BeFileListIterator () | |
BentleyStatus | GetNextFileName (BeFileName &name) |
Retrieve the next filename found from the path list. More... | |
An iterator to walk through a semicolon delimited list of file paths.
Each entry may include wildcards (e.g. "\a\*;*.exe;c:\temp\Ab*", etc.). The iterator returns one filename at a time. There is also an option to recursively return entries from subdirectories. This is most useful when the list includes the name of one or more directories. The interaction between wildcards and recursion can be confusing. If the list includes both, the result is that if the wildcard returns a directory, all of its entries are returned (note, the wildcard is applied only at the first level, NOT recursively). So, if the filepath "\123\a*" is passed with recursion on, the file "\123\abc.txt" is returned, as well as ALL of the files in the directory "\123\apples\" and all of its subdirectories, but none of the files in "\123\def\" are returned, even if they start with "a".
BeFileListIterator | ( | WCharCP | filePathList, |
bool | recursive | ||
) |
Construct an instance of a BeFileListIterator.
[in] | filePathList | A list of semicolon delimited file paths, including wildcards, to iterate. |
[in] | recursive | If the list contatains the name of a directory, or if a directory matches a wildcard, return its contents, recursively. |
BeFileListIterator | ( | WStringCR | filePathList, |
bool | recursive | ||
) |
Construct an instance of a BeFileListIterator.
[in] | filePathList | A list of semicolon delimited file paths, including wildcards, to iterate. |
[in] | recursive | If the list contatains the name of a directory, or if a directory matches a wildcard, return its contents, recursively. |
BeFileListIterator | ( | CharCP | filePathList, |
bool | recursive | ||
) |
Construct an instance of a BeFileListIterator.
[in] | filePathList | A list of semicolon delimited file paths, including wildcards, to iterate. |
[in] | recursive | If the list contatains the name of a directory, or if a directory matches a wildcard, return its contents, recursively. |
~BeFileListIterator | ( | ) |
BentleyStatus GetNextFileName | ( | BeFileName & | name | ) |
Retrieve the next filename found from the path list.
[out] | name | The name of the next valid file from the path list. |