Allows to monitor changes in a file contents.
More...
#include <file_tracker.hpp>
|
| typedef kanzi::function< void(kanzi::string_view filename)> | ModifiedFunction |
| | Type of callback function to notify for file modification. More...
|
| |
Allows to monitor changes in a file contents.
◆ ModifiedFunction
Type of callback function to notify for file modification.
◆ FileTracker()
| kanzi::connect::FileTracker::FileTracker |
( |
Domain & |
domain | ) |
|
Constructor.
- Parameters
-
| domain | Kanzi UI domain. Used for subscribing timers. Mandatory. |
◆ ~FileTracker()
| kanzi::connect::FileTracker::~FileTracker |
( |
| ) |
|
◆ getFileModificationTime()
| time_t kanzi::connect::FileTracker::getFileModificationTime |
( |
| ) |
const |
|
protected |
Retrieve modification time of the file that is being tracked.
- Returns
- Time of previous modification.
◆ onTimer()
| void kanzi::connect::FileTracker::onTimer |
( |
const kanzi::TimerMessageArguments & |
arguments | ) |
|
|
protected |
Timer callback function.
- Parameters
-
| arguments | Arguments for the timer callback function. |
◆ start()
| void kanzi::connect::FileTracker::start |
( |
kanzi::string_view |
filename, |
|
|
ModifiedFunction |
modified |
|
) |
| |
Starts tracking of given file.
- Parameters
-
| filename | File path to file that will be tracked. |
| modified | Function callback to invoke when a change occurs in file. |
◆ stop()
| void kanzi::connect::FileTracker::stop |
( |
| ) |
|
The documentation for this class was generated from the following file:
- connect/kanzi_adaptation/datasource/file_tracker.hpp