2024-02-05 22:25:30 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ehs/EHS.h"
|
|
|
|
#include "ehs/Str.h"
|
|
|
|
|
|
|
|
#define EHS_FE_NONE 0x00
|
|
|
|
#define EHS_FE_MODIFIED 0x01
|
|
|
|
#define EHS_FE_DELETED 0x02
|
|
|
|
#define EHS_FE_MOVED 0x04
|
|
|
|
#define EHS_FE_OPENED 0x08
|
|
|
|
|
|
|
|
namespace ehs
|
|
|
|
{
|
2024-07-24 01:36:20 -07:00
|
|
|
class EHS_LIB_IO BaseFileMonitor
|
2024-02-05 22:25:30 -08:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
Str_8 filePath;
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual ~BaseFileMonitor() = default;
|
|
|
|
|
|
|
|
BaseFileMonitor() = default;
|
|
|
|
|
|
|
|
BaseFileMonitor(Str_8 filePath);
|
|
|
|
|
|
|
|
BaseFileMonitor(BaseFileMonitor&& fm) noexcept;
|
|
|
|
|
|
|
|
BaseFileMonitor(const BaseFileMonitor& fm);
|
|
|
|
|
|
|
|
BaseFileMonitor& operator=(BaseFileMonitor&& fm) noexcept;
|
|
|
|
|
|
|
|
BaseFileMonitor& operator=(const BaseFileMonitor& fm);
|
|
|
|
|
|
|
|
virtual void Initialize() = 0;
|
|
|
|
|
|
|
|
virtual void Release() = 0;
|
|
|
|
|
|
|
|
virtual UInt_8 Poll() = 0;
|
|
|
|
|
|
|
|
Str_8 GetFilePath() const;
|
|
|
|
|
|
|
|
bool IsValid() const;
|
|
|
|
|
|
|
|
virtual bool IsInitialized() const = 0;
|
|
|
|
};
|
|
|
|
}
|