SleakEngine 0.1.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::FileWatcher Class Reference

#include <FileWatcher.hpp>

Classes

struct  Impl

Public Member Functions

 FileWatcher ()
 FileWatcher (const FileWatcher &)=delete
 ~FileWatcher ()
bool AddDirectory (const std::string &dir)
 Starts watching a directory. Returns false if it can't be watched.
FileWatcher & operator= (const FileWatcher &)=delete
void Poll (std::vector< std::string > &outChanged)
 Appends full paths of files saved since the last call. Never blocks.

Detailed Description

Reports files saved inside watched directories. Not recursive. Generic: shader, library and asset hot reload all build on it.

Definition at line 14 of file FileWatcher.hpp.

Constructor & Destructor Documentation

◆ FileWatcher() [1/2]

Sleak::FileWatcher::FileWatcher ( )

Definition at line 173 of file FileWatcher.cpp.

◆ ~FileWatcher()

Sleak::FileWatcher::~FileWatcher ( )
default

◆ FileWatcher() [2/2]

Sleak::FileWatcher::FileWatcher ( const FileWatcher & )
delete

Member Function Documentation

◆ AddDirectory()

bool Sleak::FileWatcher::AddDirectory ( const std::string & dir)

Starts watching a directory. Returns false if it can't be watched.

Definition at line 177 of file FileWatcher.cpp.

◆ operator=()

FileWatcher & Sleak::FileWatcher::operator= ( const FileWatcher & )
delete

◆ Poll()

void Sleak::FileWatcher::Poll ( std::vector< std::string > & outChanged)

Appends full paths of files saved since the last call. Never blocks.

Definition at line 182 of file FileWatcher.cpp.