#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.
◆ FileWatcher()
| 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. |
◆ ~FileWatcher()
| te::core::FileWatcher::~FileWatcher |
( |
| ) |
|
◆ unwatch()
| void te::core::FileWatcher::unwatch |
( |
| ) |
|
Stops the thread watching the file.
◆ watch()
| void te::core::FileWatcher::watch |
( |
| ) |
|
Starts a thread that will monitor the given file and call the previously given callback function.
◆ m_callback
| std::function<void()> te::core::FileWatcher::m_callback |
|
private |
◆ m_file
| std::string te::core::FileWatcher::m_file |
|
private |
◆ m_mutex
| std::mutex te::core::FileWatcher::m_mutex |
|
private |
◆ m_running
| bool te::core::FileWatcher::m_running |
|
private |
◆ m_watcher
| 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_release/src/terralib/core/filesystem/FileWatcher.h