CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::LinuxFileWatcher Class Reference

File watcher for the local file system on Linux platforms. More...

#include <CeresEngine/Platform/Linux/LinuxFileWatcher.hpp>

Inheritance diagram for CeresEngine::LinuxFileWatcher:
CeresEngine::IFileWatcher

Classes

struct  Watcher
 Watcher entry. More...
 

Public Member Functions

 LinuxFileWatcher (LinuxFileSystem &fileSystem)
 Creates a new LinuxFileWatcher instance.
 
 LinuxFileWatcher (LinuxFileWatcher &&) noexcept=delete
 
LinuxFileWatcheroperator= (LinuxFileWatcher &&) noexcept=delete
 
 ~LinuxFileWatcher () final
 
IFileSystemgetFileSystem () const final
 Gets file system that this watcher watches for.
 
void add (FileHandle &dir, UInt32 events, bool recursive) final
 
void watch (Int32 timeout) final
 
- Public Member Functions inherited from CeresEngine::IFileWatcher
 IFileWatcher ()
 
virtual ~IFileWatcher ()
 
virtual void start ()=0
 Starts the file watching operation.
 
virtual void stop ()=0
 Stops the file watching operation.
 

Private Attributes

RC< LinuxFileSystemmFileSystem
 File system that created this watcher.
 
Int32 mInotify
 File handle for the inotify instance.
 
HashMap< int, WatchermWatchers
 Map of watch handle -> file handle.
 

Additional Inherited Members

- Protected Member Functions inherited from CeresEngine::IFileWatcher
void onFileEvent (const FileHandle &handle, FileEvent event)
 Called on file event.
 
- Protected Attributes inherited from CeresEngine::IFileWatcher
FileWatchermFileWatcher
 File watcher that owns the implementation.
 

Detailed Description

File watcher for the local file system on Linux platforms.

Constructor & Destructor Documentation

◆ LinuxFileWatcher() [1/2]

CeresEngine::LinuxFileWatcher::LinuxFileWatcher ( LinuxFileSystem fileSystem)
explicit

Creates a new LinuxFileWatcher instance.

Parameters
fileSystemThe file system that created this watcher.

◆ LinuxFileWatcher() [2/2]

CeresEngine::LinuxFileWatcher::LinuxFileWatcher ( LinuxFileWatcher &&  )
deletenoexcept

◆ ~LinuxFileWatcher()

CeresEngine::LinuxFileWatcher::~LinuxFileWatcher ( )
final

Member Function Documentation

◆ add()

void CeresEngine::LinuxFileWatcher::add ( FileHandle dir,
UInt32  events,
bool  recursive 
)
final

◆ getFileSystem()

IFileSystem * CeresEngine::LinuxFileWatcher::getFileSystem ( ) const
finalvirtual

Gets file system that this watcher watches for.

Returns
The watched file system (can be null).

Implements CeresEngine::IFileWatcher.

◆ operator=()

LinuxFileWatcher & CeresEngine::LinuxFileWatcher::operator= ( LinuxFileWatcher &&  )
deletenoexcept

◆ watch()

void CeresEngine::LinuxFileWatcher::watch ( Int32  timeout)
final

Member Data Documentation

◆ mFileSystem

RC<LinuxFileSystem> CeresEngine::LinuxFileWatcher::mFileSystem
private

File system that created this watcher.

◆ mInotify

Int32 CeresEngine::LinuxFileWatcher::mInotify
private

File handle for the inotify instance.

◆ mWatchers

HashMap<int, Watcher> CeresEngine::LinuxFileWatcher::mWatchers
private

Map of watch handle -> file handle.


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