Line data Source code
1 : #include "source/common/config/watched_directory.h" 2 : 3 : namespace Envoy { 4 : namespace Config { 5 : 6 : WatchedDirectory::WatchedDirectory(const envoy::config::core::v3::WatchedDirectory& config, 7 0 : Event::Dispatcher& dispatcher) { 8 0 : watcher_ = dispatcher.createFilesystemWatcher(); 9 0 : watcher_->addWatch(absl::StrCat(config.path(), "/"), Filesystem::Watcher::Events::MovedTo, 10 0 : [this](uint32_t) { cb_(); }); 11 0 : } 12 : 13 : } // namespace Config 14 : } // namespace Envoy