TrinityCore
|
Classes | |
class | Watcher_CAPI |
Macros | |
#define | TOBOOL(i) ((i) == 0 ? false : true) |
Functions | |
Watcher_CAPI * | find_callback (efsw_watcher watcher, efsw_pfn_fileaction_callback fn) |
Watcher_CAPI * | remove_callback (efsw_watcher watcher) |
efsw_watcher | efsw_create (int generic_mode) |
void | efsw_release (efsw_watcher watcher) |
Release the file-watcher and unwatch any directories. More... | |
const char * | efsw_getlasterror () |
Retreive last error occured by file-watcher. More... | |
efsw_watchid | efsw_addwatch (efsw_watcher watcher, const char *directory, efsw_pfn_fileaction_callback callback_fn, int recursive, void *param) |
void | efsw_removewatch (efsw_watcher watcher, const char *directory) |
Remove a directory watch. This is a brute force search O(nlogn). More... | |
void | efsw_removewatch_byid (efsw_watcher watcher, efsw_watchid watchid) |
Remove a directory watch. This is a map lookup O(logn). More... | |
void | efsw_watch (efsw_watcher watcher) |
Starts watching ( in other thread ) More... | |
void | efsw_follow_symlinks (efsw_watcher watcher, int enable) |
int | efsw_follow_symlinks_isenabled (efsw_watcher watcher) |
void | efsw_allow_outofscopelinks (efsw_watcher watcher, int allow) |
int | efsw_outofscopelinks_isallowed (efsw_watcher watcher) |
Variables | |
static std::vector < Watcher_CAPI * > | g_callbacks |
efsw_watchid efsw_addwatch | ( | efsw_watcher | watcher, |
const char * | directory, | ||
efsw_pfn_fileaction_callback | callback_fn, | ||
int | recursive, | ||
void * | param | ||
) |
Add a directory watch. Same as the other addWatch, but doesn't have recursive option. For backwards compatibility. On error returns WatchID with Error type.
void efsw_allow_outofscopelinks | ( | efsw_watcher | watcher, |
int | allow | ||
) |
When enable this it will allow symlinks to watch recursively out of the pointed directory. follorSymlinks must be enabled to this work. For example, added symlink to /home/folder, and the symlink points to /, this by default is not allowed, it's only allowed to symlink anything from /home/ and deeper. This is to avoid great levels of recursion. Enabling this could lead in infinite recursion, and crash the watcher ( it will try not to avoid this ). Buy enabling out of scope links, it will allow this behavior. allowOutOfScopeLinks are disabled by default.
efsw_watcher efsw_create | ( | int | generic_mode | ) |
Creates a new file-watcher
generic_mode | Force the use of the Generic file watcher |
void efsw_follow_symlinks | ( | efsw_watcher | watcher, |
int | enable | ||
) |
int efsw_follow_symlinks_isenabled | ( | efsw_watcher | watcher | ) |
const char* efsw_getlasterror | ( | ) |
int efsw_outofscopelinks_isallowed | ( | efsw_watcher | watcher | ) |
void efsw_release | ( | efsw_watcher | watcher | ) |
Release the file-watcher and unwatch any directories.
void efsw_removewatch | ( | efsw_watcher | watcher, |
const char * | directory | ||
) |
void efsw_removewatch_byid | ( | efsw_watcher | watcher, |
efsw_watchid | watchid | ||
) |
void efsw_watch | ( | efsw_watcher | watcher | ) |
Watcher_CAPI* find_callback | ( | efsw_watcher | watcher, |
efsw_pfn_fileaction_callback | fn | ||
) |
Watcher_CAPI* remove_callback | ( | efsw_watcher | watcher | ) |
|
static |