Cogs.Foundation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
Cogs::FileSystemWatcher Class Reference

#include <FileSystemWatcher.h>

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

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

Private Attributes

Storagestorage = nullptr
 

Member Typedef Documentation

◆ CallbackFn

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

◆ CallbackList

Member Enumeration Documentation

◆ EventType

Enumerator
None 
FileCreated 
FileDeleted 
FileRenamed 
FileUpdated 

Constructor & Destructor Documentation

◆ FileSystemWatcher()

Cogs::FileSystemWatcher::FileSystemWatcher ( )

References storage.

◆ ~FileSystemWatcher()

Cogs::FileSystemWatcher::~FileSystemWatcher ( )

Member Function Documentation

◆ unwatchFile()

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

◆ watchFile()

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

Member Data Documentation

◆ storage

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

Referenced by FileSystemWatcher().


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