6#include <PhosphorFsLoader/phosphorfsloader_export.h>
9#include <QtCore/QObject>
10#include <QtCore/QString>
11#include <QtCore/QStringList>
12#include <QtCore/QTimer>
17class QFileSystemWatcher;
146 qint64 mtimeNsec = 0;
148 bool operator==(
const Fingerprint&)
const =
default;
151 static Fingerprint fingerprintOf(
const QString& path);
152 void onDebounceElapsed();
153 void onIdentityWindowElapsed();
155 QFileSystemWatcher* m_watcher =
nullptr;
158 std::unique_ptr<detail::IdentityWatches> m_watches;
160 QHash<QString, Fingerprint> m_fingerprints;
163 QTimer m_debounceTimer;
168 QTimer m_identityTimer;
void setDebounceInterval(int ms)
Change the debounce window, for reports and for identity checks alike.
~WatchedFileSet() override
WatchedFileSet(const WatchedFileSet &)=delete
QStringList paths() const
The watched paths in normalised form, in the order given to setPaths.
static constexpr int DefaultDebounceMs
Default debounce, long enough to coalesce an editor's write-temp-then-rename save into one report.
Definition WatchedFileSet.h:87
int debounceInterval() const
void filesChanged(const QStringList &paths)
Emitted once per debounce window that changed something.
WatchedFileSet & operator=(const WatchedFileSet &)=delete
QStringList watchedPathsForTest() const
Test-only: every path the underlying watcher currently holds (files and directories together,...
void setPaths(const QStringList &paths)
Replace the watched set with paths.
WatchedFileSet(QObject *parent=nullptr)
Definition MetadataPackScanStrategy.h:506
Definition ContainedFileReader.h:15