lfilesystem  0.0.1
C++ filesystem library
limes::files::DynamicLibrary::Reloader Class Referencefinal

This class watches a dynamic library file for changes on disk. More...

#include <lfilesystem_DynamicLibrary.h>

+ Inheritance diagram for limes::files::DynamicLibrary::Reloader:

Public Member Functions

 Reloader (DynamicLibrary &libraryToReload)
 Creates a Reloader object watching the specified library. More...
 
- Public Member Functions inherited from limes::files::FileWatcher
 FileWatcher () noexcept
 Creates an inactive FileWatcher that does nothing. More...
 
 FileWatcher (const FilesystemEntry &fileToWatch)
 Creates a FileWatcher to watch the given file or directory. More...
 
 FileWatcher (const FileWatcher &)=delete
 
 FileWatcher (FileWatcher &&)=delete
 
virtual ~FileWatcher ()
 Destructor. More...
 
virtual void fileAccessed (const FilesystemEntry &)
 Called when a file's content is accessed. More...
 
virtual void fileCreated (const FilesystemEntry &)
 Called when a file or subdirectory is created in a watched directory. More...
 
virtual void fileHandleClosed (const FilesystemEntry &)
 Called when a file handle is closed (from either reading or writing). More...
 
virtual void fileMetadataChanged (const FilesystemEntry &)
 Called when a file's metadata is changed, such as permissions, owner, etc. More...
 
virtual void fileMoved (const FilesystemEntry &)
 Called when a file is moved or renamed. More...
 
virtual void fileOpened (const FilesystemEntry &)
 Called when a file handle is created (for either reading or writing). More...
 
FilesystemEntry getWatchedPath () const noexcept
 Returns the path that is currently being watched. More...
 
bool isRunning ()
 Returns true if the FilesystemWatcher is currently monitoring events. More...
 
FileWatcheroperator= (const FileWatcher &)=delete
 
FileWatcheroperator= (FileWatcher &&)=delete
 
virtual void otherEventType (const FilesystemEntry &)
 Called when an unspecified event has occurred, such as one of the watched file's parent directories being renamed or deleted. More...
 
bool start ()
 Restarts watching the path specified at construction. More...
 
bool start (const FilesystemEntry &newPathToWatch)
 Begins watching the new specified path. More...
 
void stop ()
 Stops the FilesystemWatcher's event callbacks. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from limes::files::FileWatcher
static bool supportedBySystem () noexcept
 Returns true if the current system supports file event watching. More...
 

Detailed Description

This class watches a dynamic library file for changes on disk.

If the file is deleted, this calls DynamicLibrary::close() , and if the file is modified, this calls DynamicLibrary::reload() .

See also
DynamicLibrary::reload()

Definition at line 161 of file lfilesystem_DynamicLibrary.h.

Constructor & Destructor Documentation

◆ Reloader()

limes::files::DynamicLibrary::Reloader::Reloader ( DynamicLibrary libraryToReload)
explicit

Creates a Reloader object watching the specified library.


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