Sese Framework
2.3.0
A cross-platform framework
|
File Change Monitor. More...
#include <FileNotifier.h>
Public Types | |
using | Ptr = std::unique_ptr<FileNotifier> |
Public Member Functions | |
virtual | ~FileNotifier () noexcept |
void | loopNonblocking () noexcept |
Start a thread to start processing the change event. | |
void | shutdown () noexcept |
Shut down the monitor and block until the background thread exits. | |
Static Public Member Functions | |
static FileNotifier::Ptr | create (const std::string &path, FileNotifyOption *option) noexcept |
static Result< Ptr, ErrorCode > | createEx (const std::string &path, FileNotifyOption *option) noexcept |
Private Member Functions | |
FileNotifier ()=default | |
File Change Monitor.
In Darwin, multiple events for the same file are triggered first, while in Windows and Linux, events are triggered in chronological order.
using sese::system::FileNotifier::Ptr = std::unique_ptr<FileNotifier> |
|
virtualnoexcept |
References shutdown().
|
privatedefault |
|
staticnoexcept |
Create file monitor
path | The path to the [directory] |
option | Callback options |
nullptr | Creation failed |
References callback(), and MAKE_UNIQUE_PRIVATE.
|
staticnoexcept |
|
noexcept |
Start a thread to start processing the change event.
|
noexcept |
Shut down the monitor and block until the background thread exits.
Referenced by ~FileNotifier().