Files
Fractured/modules/mod-ale/src/LuaEngine/ALEFileWatcher.h
T
Docker Build 8e4c8f57e4 Fractured: Paragon core hooks, mod-paragon, mod-ale, Docker build cap
- Track mod-paragon and mod-ale (un-ignore modules in .gitignore).
- Ship docker-compose.override.yml with CMAKE_EXTRA_OPTIONS for LuaJIT (mod-ale).
- Dockerfile: CBUILD_PARALLEL default to limit OOM under Docker/WSL2.
- Core: CLASS_PARAGON sticky combo points (DetachComboTarget), selection rebind,
  Spell::CheckPower rune path for multi-resource Paragon.
- spell_dk_death_rune: IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_ABILITY) for
  Blood of the North / Reaping / DRM on Paragon.
- Remove temporary Paragon CheckPower logging.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-08 00:03:09 -04:00

44 lines
1.0 KiB
C++

/*
* Copyright (C) 2010 - 2025 Eluna Lua Engine <https://elunaluaengine.github.io/>
* This program is free software licensed under GPL version 3
* Please see the included DOCS/LICENSE.md for more information
*/
#ifndef ALE_FILE_WATCHER_H
#define ALE_FILE_WATCHER_H
#include <thread>
#include <atomic>
#include <map>
#include <string>
#include <chrono>
#include <boost/filesystem.hpp>
#include "Common.h"
class ALEFileWatcher
{
public:
ALEFileWatcher();
~ALEFileWatcher();
void StartWatching(const std::string& scriptPath, uint32 intervalSeconds = 1);
void StopWatching();
bool IsWatching() const { return running.load(); }
private:
void WatchLoop();
void ScanDirectory(const std::string& path);
void CheckForChanges();
bool ShouldReloadFile(const std::string& filepath);
bool IsWatchedFileType(const std::string& filename);
std::thread watcherThread;
std::atomic<bool> running;
std::string watchPath;
uint32 checkInterval;
std::map<std::string, std::time_t> fileTimestamps;
};
#endif