#include <tchar.h>Data Structures | |
| struct | _TWOptions |
Defines | |
| #define | TREEWALK_H__66C2542C_CBE1_11D6_9360_0020182E0D04__INCLUDED_ |
| #define | TREEWALK_API __declspec(dllimport) |
| #define | TW_WALKING_STOP -1 |
Typedefs | |
| typedef enum _TWErr_codes | TWErr_codes |
| typedef void * | TWHandle |
| typedef enum _TWType | TWType |
| typedef _TWOptions | TWOptions |
| typedef int(*) | TWCandidateHandler (const TCHAR *candidate, void *data) |
| typedef BOOL(*) | TWFilter (const TCHAR *candidate, void *data) |
Enumerations | |
| enum | _TWErr_codes { CANT_CREATE_FILELIST, CANT_LOAD_STOPPOINT, CANT_SAVE_STOPPOINT } |
| enum | _TWType { level_order, pre_order, post_order, in_order } |
Functions | |
| TREEWALK_API int | TWNewHandle (TWHandle *handle, const TWOptions *options) |
| TREEWALK_API int | TWScanDirTree (const TWHandle handle, const TCHAR *path, TWCandidateHandler ch, TWFilter filter, void *data) |
| TREEWALK_API int | TWDelHandle (TWHandle handle) |
| #define TREEWALK_API __declspec(dllimport) |
| #define TREEWALK_H__66C2542C_CBE1_11D6_9360_0020182E0D04__INCLUDED_ |
| #define TW_WALKING_STOP -1 |
return-code from TWScanDirTree call bach function which tell to stop wree-walking and save a stop-point to given file.
| typedef int(*) TWCandidateHandler(const TCHAR *candidate, void *data) |
Input: candidate_path - The founded file candidate Output: ReturnCode The function is called for each file provided by TWScanDirTree(). The function implements a file handling code. The returned ReturnCode value is used by the tree-walk code to indetify stop condition: TW_WALKING_STOP
| typedef enum _TWErr_codes TWErr_codes |
Error codes
| typedef BOOL(*) TWFilter(const TCHAR *candidate, void *data) |
Input: candidate_path - The founded file candidate Output: ReturnCode The function is called for each file AND DIRECTORY provided by TWScanDirTree(). The function do filtration of file-candidates and directories. It must return TRUE if the candidate is met to the filter.
| typedef void* TWHandle |
Tree-walk context handle
| typedef struct _TWOptions TWOptions |
Tree-walk options
| enum _TWErr_codes |
| enum _TWType |
| TREEWALK_API int TWDelHandle | ( | TWHandle | handle | ) |
Input: TWHandle Output: ReturnCode The TWDelHandle function releases all allocated resources.
Input: const TWOptions * options contains properties of new tree-walk instance
Output: TWHandle * handle
The TWNewHandle function returns a context handle to the calling thread for allowing reentrant processing.
| TREEWALK_API int TWScanDirTree | ( | const TWHandle | handle, | |
| const TCHAR * | path, | |||
| TWCandidateHandler | ch, | |||
| TWFilter | filter, | |||
| void * | data | |||
| ) |
Input: TWHandle - handle of tree walk, path - path to subtree for start walking ch - pointer to callback function TWCandidateHandler() data - pointer to any data which you want to send to the call-back function. Output: ReturnCode The tree traversal process is done in TWScanDirTree function and for every file candidate the provided handler is called.
1.5.1-p1