Rename new API to FileWatcher (resolve #1064)

This commit is contained in:
Joshua Granick
2017-09-26 06:18:13 -07:00
parent 75e78a6d8f
commit a70a948329
7 changed files with 120 additions and 120 deletions

View File

@@ -0,0 +1,42 @@
#ifndef LIME_SYSTEM_FILE_WATCHER_H
#define LIME_SYSTEM_FILE_WATCHER_H
#ifdef RemoveDirectory
#undef RemoveDirectory
#endif
#include <hx/CFFI.h>
#include <map>
#include <string>
namespace lime {
class FileWatcher {
public:
FileWatcher (value callback);
~FileWatcher ();
unsigned long AddDirectory (const std::string directory, bool recursive);
void RemoveDirectory (unsigned long watchID);
void Update ();
AutoGCRoot* callback;
private:
void* fileWatcher = 0;
std::map<unsigned long, void*> watchListeners;
};
}
#endif