EntropyEngine::Core::IO::FileWatch
EntropyEngine::Core::IO::FileWatch
Section titled “EntropyEngine::Core::IO::FileWatch”File system watch object (refcounted, handle-stampable). More…
#include <FileWatch.h>
Inherits from EntropyEngine::Core::EntropyObject
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| ~FileWatch() override | |
| void | stop() Stops watching the file system. |
| const std::string & | path() const Gets the path being watched. |
| const WatchOptions & | options() const Gets the watch options. |
| bool | isWatching() const Checks if this watch is currently active. |
| virtual const char * | className() const override Runtime class name for diagnostics and reflection. |
| FileWatch(FileWatchManager * owner, const std::string & path, FileWatchCallback callback, const WatchOptions & options) Constructs a file watch (internal - use FileWatchManager::createWatch). |
Friends
Section titled “Friends”| Name | |
|---|---|
| class | FileWatchManager |
Additional inherited members
Section titled “Additional inherited members”Protected Classes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleCore Optional handle identity stamped by an owner/registry. |
Public Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| virtual | ~EntropyObject() =default |
| virtual const TypeSystem::TypeInfo * | typeInfo() const Optional richer type information; may be null. |
| bool | tryRetain() const Attempts to retain only if the object is still alive. |
| virtual std::string | toString() const Human-readable short string (class@ptr by default). |
| void | retain() const Increments the reference count. |
| void | release() const Decrements the reference count and deletes when it reaches zero. |
| uint32_t | refCount() const Current reference count (approximate under contention). |
| EntropyObject & | operator=(const EntropyObject & ) =delete |
| EntropyObject & | operator=(EntropyObject && ) =delete |
| bool | hasHandle() const |
| template <class OwnerT > OwnerT * | handleOwnerAs() const Returns the stamped owner pointer cast to the requested type. |
| const void * | handleOwner() const |
| uint32_t | handleIndex() const |
| uint64_t | handleId() const |
| uint32_t | handleGeneration() const |
| WeakControlBlock * | getWeakControlBlock() const Lazily retrieves or creates the weak control block. |
| virtual std::string | description() const Long-form description; defaults to toString(). |
| virtual std::string | debugString() const Debug-oriented string including refcount and handle when present. |
| virtual uint64_t | classHash() const Stable type hash for cross-language identification. |
| EntropyObject() =default | |
| EntropyObject(EntropyObject && ) =delete | |
| EntropyObject(const EntropyObject & ) =delete |
Protected Functions inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| void | _setHandleIdentity(void * owner, uint32_t index, uint32_t generation) |
| void | _clearHandleIdentity() |
Protected Attributes inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| std::atomic< WeakControlBlock * > | _weakBlock Lazily allocated control block for weak refs. |
| std::atomic< uint32_t > | _refCount Thread-safe retain/release counter. |
| struct EntropyEngine::Core::EntropyObject::HandleCore | _handle |
Friends inherited from EntropyEngine::Core::EntropyObject
| Name | |
|---|---|
| struct | HandleAccess |
Detailed Description
Section titled “Detailed Description”class EntropyEngine::Core::IO::FileWatch;File system watch object (refcounted, handle-stampable).
FileWatch is an EntropyObject that represents an active file system watch. The object is refcounted and can be stamped with handle identity by the FileWatchManager for validation. When the last reference is released, the destructor automatically stops the watch.
Usage:
FileWatch* watch = vfs.watchDirectory("./src", callback, opts);// watch has refcount=1, you own the reference
// Later, stop and releasewatch->stop(); // Stop watchingwatch->release(); // Decrement refcount (may delete if 0)Public Functions Documentation
Section titled “Public Functions Documentation”function ~FileWatch
Section titled “function ~FileWatch”~FileWatch() overridefunction stop
Section titled “function stop”void stop()Stops watching the file system.
Note: Idempotent - safe to call multiple times
function path
Section titled “function path”inline const std::string & path() constGets the path being watched.
function options
Section titled “function options”inline const WatchOptions & options() constGets the watch options.
function isWatching
Section titled “function isWatching”inline bool isWatching() constChecks if this watch is currently active.
function className
Section titled “function className”inline virtual const char * className() const overrideRuntime class name for diagnostics and reflection.
Reimplements: EntropyEngine::Core::EntropyObject::className
function FileWatch
Section titled “function FileWatch”FileWatch( FileWatchManager * owner, const std::string & path, FileWatchCallback callback, const WatchOptions & options)Constructs a file watch (internal - use FileWatchManager::createWatch).
Friends
Section titled “Friends”friend FileWatchManager
Section titled “friend FileWatchManager”friend class FileWatchManager( FileWatchManager);Updated on 2026-01-26 at 17:14:35 -0500