#include <FileHelpers.hpp>
Public Member Functions | |
FileMonitor (std::filesystem::path filePath, uint32_t notifyEvents=IN_MODIFY) | |
FileMonitor (const FileMonitor &)=delete | |
Copy constructor. | |
FileMonitor (FileMonitor &&)=delete | |
Move constructor. | |
FileMonitor & | operator= (FileMonitor)=delete |
Copy assignment operator. | |
FileMonitor & | operator= (FileMonitor &&)=delete |
Move assignment operator. | |
FNotifyCallback | notifyCallback () const |
void | notifyCallback (FNotifyCallback func) |
void | userPtr (const void *ptr) |
~FileMonitor () | |
Private Member Functions | |
void | threadFunc () const noexcept |
Private Attributes | |
int | _fDescriptor {-1} |
File descriptor. | |
int | _wDescriptor {-1} |
Watch descriptor. | |
std::filesystem::path | _filePath |
File path. | |
FNotifyCallback | _notifyCallback |
Callback function. | |
uint32_t | _notifyEvents |
Notify types. | |
const void * | _userPtr = nullptr |
User pointer. | |
std::unique_ptr< std::thread > | _thread |
Thread. | |
std::atomic_flag | _shouldStop {false} |
Flag to stop monitoring. | |
Invokes functions for a file for given notify events
Definition at line 65 of file FileHelpers.hpp.
|
explicit |
Constructor
[in] | filePath | Path to the file |
[in] | notifyEvents | Events to notify |
Definition at line 57 of file FileHelpers.cpp.
|
delete |
Copy constructor.
|
delete |
Move constructor.
FileMonitor::~FileMonitor | ( | ) |
Destructor
Definition at line 81 of file FileHelpers.cpp.
|
inlinenodiscard |
Definition at line 107 of file FileHelpers.hpp.
|
inline |
Definition at line 108 of file FileHelpers.hpp.
|
delete |
Move assignment operator.
|
delete |
Copy assignment operator.
|
privatenoexcept |
Definition at line 16 of file FileHelpers.cpp.
|
inline |
Sets user pointer
[in] | ptr | User pointer |
Definition at line 114 of file FileHelpers.hpp.
|
private |
|
private |
File path.
Definition at line 72 of file FileHelpers.hpp.
|
private |
Callback function.
Definition at line 74 of file FileHelpers.hpp.
|
private |
Notify types.
Definition at line 76 of file FileHelpers.hpp.
|
private |
|
private |
Thread.
Definition at line 81 of file FileHelpers.hpp.
|
private |
User pointer.
Definition at line 78 of file FileHelpers.hpp.
|
private |