1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-01 15:35:47 +00:00
Aquaria/BBGE/DirWatcher.h

31 lines
450 B
C++

#pragma once
#include "Base.h"
namespace DirWatcher {
enum Flags
{
NONE = 0,
RECURSIVE = 0x01
};
enum Action
{
UNKNOWN,
CREATED,
MODIFIED,
};
typedef void (*Callback)(const std::string& fn, Action act, void *ud);
bool Init();
void Shutdown();
void Pump(); // call from mainloop
size_t AddWatch(const char *path, Flags flags, Callback cb, void *ud); // returns > 0 on success
void RemoveWatch(size_t idx);
} // end namespace DirWatcher