18 #include "lfilesystem/lfilesystem_Export.h"
171 static
bool supportedBySystem() noexcept;
176 [[maybe_unused]] std::unique_ptr<Impl> pimpl;
This class listens for changes to or operations on a certain file, and receives callbacks to be notif...
virtual void fileMetadataChanged(const FilesystemEntry &)
Called when a file's metadata is changed, such as permissions, owner, etc.
virtual void fileCreated(const FilesystemEntry &)
Called when a file or subdirectory is created in a watched directory.
virtual void fileMoved(const FilesystemEntry &)
Called when a file is moved or renamed.
virtual void otherEventType(const FilesystemEntry &)
Called when an unspecified event has occurred, such as one of the watched file's parent directories b...
bool start()
Restarts watching the path specified at construction.
virtual void fileHandleClosed(const FilesystemEntry &)
Called when a file handle is closed (from either reading or writing).
virtual void fileDeleted(const FilesystemEntry &)
Called when a file is deleted.
FileWatcher(const FilesystemEntry &fileToWatch)
Creates a FileWatcher to watch the given file or directory.
bool isRunning()
Returns true if the FilesystemWatcher is currently monitoring events.
bool start(const FilesystemEntry &newPathToWatch)
Begins watching the new specified path.
FileWatcher() noexcept
Creates an inactive FileWatcher that does nothing.
void stop()
Stops the FilesystemWatcher's event callbacks.
virtual void fileModified(const FilesystemEntry &)
Called when a file's content is modified.
FilesystemEntry getWatchedPath() const noexcept
Returns the path that is currently being watched.
virtual void fileOpened(const FilesystemEntry &)
Called when a file handle is created (for either reading or writing).
The base class for any kind of object on the filesystem.
This file defines the FilesystemEntry class.