8 #ifndef WPIUTIL_WPI_UV_FSEVENT_H_
9 #define WPIUTIL_WPI_UV_FSEVENT_H_
16 #include "wpi/Signal.h"
17 #include "wpi/Twine.h"
18 #include "wpi/uv/Handle.h"
29 struct private_init {};
32 explicit FsEvent(
const private_init&) {}
33 ~
FsEvent() noexcept
override =
default;
40 static std::shared_ptr<FsEvent>
Create(
Loop& loop);
47 static std::shared_ptr<FsEvent>
Create(
const std::shared_ptr<Loop>& loop) {
58 void Start(
const Twine& path,
unsigned int flags = 0);
84 #endif // WPIUTIL_WPI_UV_FSEVENT_H_
uv_fs_event_t * GetRaw() const noexcept
Get the underlying handle data structure.
Definition: Handle.h:264
Handle.
Definition: Handle.h:249
std::string GetPath()
Get the path being monitored.
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21
Filesystem Event handle.
Definition: FsEvent.h:28
sig::Signal< const char *, int > fsEvent
Signal generated when a filesystem change occurs.
Definition: FsEvent.h:78
void Stop()
Stop watching for changes.
Definition: FsEvent.h:63
void Start(const Twine &path, unsigned int flags=0)
Start watching the specified path for changes.
static std::shared_ptr< FsEvent > Create(Loop &loop)
Create a filesystem event handle.
Event loop.
Definition: Loop.h:39
static std::shared_ptr< FsEvent > Create(const std::shared_ptr< Loop > &loop)
Create a filesystem event handle.
Definition: FsEvent.h:47
SignalBase is an implementation of the observer pattern, through the use of an emitting object and sl...
Definition: Signal.h:495
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79