|
HDK
|
#include <UT_Directory.h>
Public Member Functions | |
| UT_Directory (const char *path, const char *pattern=0, int includeDots=1) | |
| int | findFile (const char *filename) const |
| Returns 1 if the file is found in the directory. More... | |
| int | entries () const |
| Returns the number of files in the member symbol table. More... | |
| void | traverseFiles (int(*func)(const char *filename, void *data), void *data=0, const char *pattern=0) const |
| int | getFiles (const char *pattern, UT_String &result) const |
| int | getFiles (const char *pattern, UT_StringList &list) const |
| int | getFiles (const char *pattern, UT_StringArray &array) const |
Definition at line 25 of file UT_Directory.h.
| UT_Directory::UT_Directory | ( | const char * | path, |
| const char * | pattern = 0, |
||
| int | includeDots = 1 |
||
| ) |
Constructs an object corresponding to a directory specified by the path parameter, and fills the member symbol table with entries corresponding to files matched by a given pattern. If includeDots is true, the hidden files (that start with a dot '.') are also added to the member symbol table.
| int UT_Directory::entries | ( | ) | const |
Returns the number of files in the member symbol table.
| int UT_Directory::findFile | ( | const char * | filename | ) | const |
Returns 1 if the file is found in the directory.
Returns a list of files matching the pattern passed in. The result contains each matching file separated by a space (or a list of files).
| int UT_Directory::getFiles | ( | const char * | pattern, |
| UT_StringList & | list | ||
| ) | const |
Returns a list of files matching the pattern passed in. The result contains each matching file separated by a space (or a list of files).
| int UT_Directory::getFiles | ( | const char * | pattern, |
| UT_StringArray & | array | ||
| ) | const |
Returns a list of files matching the pattern passed in. The result contains each matching file separated by a space (or a list of files).
| void UT_Directory::traverseFiles | ( | int(*)(const char *filename, void *data) | func, |
| void * | data = 0, |
||
| const char * | pattern = 0 |
||
| ) | const |
Traverse all the files and call the 'func' callback on the file names that match a given pattern.