Skip to content

Engine → Assets → file_watcher.h

file_watcher

Syntax

class CONJURE_API file_watcher

Derived Classes

Classes that use this as a base

Constructors

AccessSignatureDescription
publicfile_watcher();

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
publicvirtual ~file_watcher();

Functions

Public

add_root

virtual void add_root(
    std::string_view rootPath) = 0;

Main thread. Watches another directory tree; may be called while watching.

poll

virtual void poll(
    std::vector<file_change> &outChanges) = 0;

Main thread. Moves the debounced changes since the last call into outChanges.

snapshot

[[nodiscard]] virtual core::result<void> snapshot() = 0;

Records the current state as the baseline; emits nothing.