Engine → Assets → file_watcher.h
file_watcher
| Type | Class |
| Namespace | conjure::assets |
| Include File Path | engine/include/conjure/assets/file_watcher.h |
| Source File Path | engine/src/assets/file_watcher.cpp |
| API ↗ | Database, importers and hot reload |
Syntax
Derived Classes
Classes that use this as a base
Constructors
| Access | Signature | Description |
|---|---|---|
| public | file_watcher(); |
Important
Copy constructor and assignment has been deleted.
Destructors
| Access | Signature | Description |
|---|---|---|
| public | virtual ~file_watcher(); |
Functions
Public
add_root
add_rootvirtual void add_root(
std::string_view rootPath) = 0;Main thread. Watches another directory tree; may be called while watching.
poll
pollvirtual void poll(
std::vector<file_change> &outChanges) = 0;Main thread. Moves the debounced changes since the last call into outChanges.
snapshot
snapshot[[nodiscard]] virtual core::result<void> snapshot() = 0;Records the current state as the baseline; emits nothing.