Cogs.Foundation
|
#include <FileSystemWatcher.h>
Classes | |
struct | Event |
Public Types | |
enum class | EventType { None = 0 , FileCreated = 1 , FileDeleted = 2 , FileRenamed = 3 , FileUpdated = 4 } |
using | CallbackFn = std::function< void(const Event &)> |
using | CallbackList = std::vector< CallbackFn > |
Public Member Functions | |
FileSystemWatcher () | |
~FileSystemWatcher () | |
bool | watchFile (const StringView &path, const CallbackFn &callback) |
bool | unwatchFile (const StringView &path) |
Private Attributes | |
Storage * | storage = nullptr |
using Cogs::FileSystemWatcher::CallbackFn = std::function<void (const Event &)> |
using Cogs::FileSystemWatcher::CallbackList = std::vector<CallbackFn> |
|
strong |
Cogs::FileSystemWatcher::FileSystemWatcher | ( | ) |
References storage.
Cogs::FileSystemWatcher::~FileSystemWatcher | ( | ) |
bool Cogs::FileSystemWatcher::unwatchFile | ( | const StringView & | path | ) |
bool Cogs::FileSystemWatcher::watchFile | ( | const StringView & | path, |
const CallbackFn & | callback | ||
) |
|
private |
Referenced by FileSystemWatcher().