Cogs.Core
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
Cogs::FileSystemWatcher Class Reference

Classes

struct  Event
 

Public Types

enum class  EventType {
  None = 0 , FileCreated = 1 , FileDeleted = 2 , FileRenamed = 3 ,
  FileUpdated = 4
}
 
using CallbackFn = std::function< void(const Event &)>
 
using CallbackList = std::vector< CallbackFn >
 

Public Member Functions

bool watchFile (const StringView &path, const CallbackFn &callback)
 
bool unwatchFile (const StringView &path)
 

Private Attributes

Storagestorage = nullptr
 

Detailed Description

Definition at line 11 of file FileSystemWatcher.h.

Member Typedef Documentation

◆ CallbackFn

using Cogs::FileSystemWatcher::CallbackFn = std::function<void (const Event &)>

Definition at line 26 of file FileSystemWatcher.h.

◆ CallbackList

using Cogs::FileSystemWatcher::CallbackList = std::vector<CallbackFn>

Definition at line 27 of file FileSystemWatcher.h.

Member Enumeration Documentation

◆ EventType

enum class Cogs::FileSystemWatcher::EventType
strong

Definition at line 13 of file FileSystemWatcher.h.

Constructor & Destructor Documentation

◆ FileSystemWatcher()

Cogs::FileSystemWatcher::FileSystemWatcher ( )

Definition at line 3 of file FileSystemWatcher.Emscripten.cpp.

◆ ~FileSystemWatcher()

Cogs::FileSystemWatcher::~FileSystemWatcher ( )

Definition at line 7 of file FileSystemWatcher.Emscripten.cpp.

Member Function Documentation

◆ unwatchFile()

bool Cogs::FileSystemWatcher::unwatchFile ( const StringView path)

Definition at line 14 of file FileSystemWatcher.Emscripten.cpp.

◆ watchFile()

bool Cogs::FileSystemWatcher::watchFile ( const StringView path,
const CallbackFn &  callback 
)

Definition at line 10 of file FileSystemWatcher.Emscripten.cpp.

Member Data Documentation

◆ storage

Storage* Cogs::FileSystemWatcher::storage = nullptr
private

Definition at line 36 of file FileSystemWatcher.h.


The documentation for this class was generated from the following files: