#include <FileWatcher.h>
|
| FileWatcher (const std::string &path, const std::function< void()> &callback) |
| It initializes a new FileWatcher from a given path and callback function. More...
|
|
void | unwatch () |
| Stops the thread watching the file. More...
|
|
void | watch () |
| Starts a thread that will monitor the given file and call the previously given callback function. More...
|
|
| ~FileWatcher () |
| Destructor. More...
|
|
Definition at line 46 of file FileWatcher.h.
te::core::FileWatcher::FileWatcher |
( |
const std::string & |
path, |
|
|
const std::function< void()> & |
callback |
|
) |
| |
It initializes a new FileWatcher from a given path and callback function.
- Parameters
-
path | A UTF-8 String with a path to a file. |
callback | A function with zero parameters and void return that will be called when the file is changed. |
te::core::FileWatcher::~FileWatcher |
( |
| ) |
|
void te::core::FileWatcher::unwatch |
( |
| ) |
|
Stops the thread watching the file.
void te::core::FileWatcher::watch |
( |
| ) |
|
Starts a thread that will monitor the given file and call the previously given callback function.
std::function<void()> te::core::FileWatcher::m_callback |
|
private |
std::string te::core::FileWatcher::m_file |
|
private |
std::mutex te::core::FileWatcher::m_mutex |
|
private |
bool te::core::FileWatcher::m_running |
|
private |
std::thread te::core::FileWatcher::m_watcher |
|
private |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/core/filesystem/FileWatcher.h