Fray Engine
Loading...
Searching...
No Matches
fray::watch Namespace Reference

Classes

struct  FileId
 Filesystem identity surviving renames: device and inode, or volume and file index. More...
struct  Change
 Describes a detected change to the watched root or one of its entries. More...
class  FileWatcher
 Detects folder-tree changes by comparing snapshots and queues them for subscribers. poll() scans on its calling thread; dispatch() invokes handlers on its calling thread. run() is intended for a ThreadManager thread. Scan state and queue state have separate mutexes. More...

Enumerations

enum class  ChangeKind { Added , Removed , Renamed , Modified }
 Identifies an added, removed, renamed or modified entry. More...

Functions

bool fileId (const std::filesystem::path &path, FileId &id)
 Reads the entry identity without following a symbolic link.

Enumeration Type Documentation

◆ ChangeKind

enum class fray::watch::ChangeKind
strong

Identifies an added, removed, renamed or modified entry.

Enumerator
Added 
Removed 
Renamed 
Modified 

Definition at line 113 of file file_watcher.hpp.

Function Documentation

◆ fileId()

bool fray::watch::fileId ( const std::filesystem::path & path,
FileId & id )
inline

Reads the entry identity without following a symbolic link.

Parameters
pathFilesystem entry to inspect.
idReceives the identity when the platform query succeeds.
Returns
True for a valid identity; false on inspection failure or a zero identity.

Definition at line 83 of file file_watcher.hpp.