| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | // Qt-Security score:significant reason:default |
| 4 | |
| 5 | #ifndef QFILESYSTEMWATCHER_H |
| 6 | #define QFILESYSTEMWATCHER_H |
| 7 | |
| 8 | #include <QtCore/qobject.h> |
| 9 | |
| 10 | QT_REQUIRE_CONFIG(filesystemwatcher); |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | |
| 15 | class QFileSystemWatcherPrivate; |
| 16 | |
| 17 | class Q_CORE_EXPORT QFileSystemWatcher : public QObject |
| 18 | { |
| 19 | Q_OBJECT |
| 20 | Q_DECLARE_PRIVATE(QFileSystemWatcher) |
| 21 | |
| 22 | public: |
| 23 | QFileSystemWatcher(QObject *parent = nullptr); |
| 24 | QFileSystemWatcher(const QStringList &paths, QObject *parent = nullptr); |
| 25 | ~QFileSystemWatcher(); |
| 26 | |
| 27 | bool addPath(const QString &file); |
| 28 | QStringList addPaths(const QStringList &files); |
| 29 | bool removePath(const QString &file); |
| 30 | QStringList removePaths(const QStringList &files); |
| 31 | |
| 32 | QStringList files() const; |
| 33 | QStringList directories() const; |
| 34 | |
| 35 | Q_SIGNALS: |
| 36 | void fileChanged(const QString &path, QPrivateSignal); |
| 37 | void directoryChanged(const QString &path, QPrivateSignal); |
| 38 | }; |
| 39 | |
| 40 | QT_END_NAMESPACE |
| 41 | |
| 42 | #endif // QFILESYSTEMWATCHER_H |
| 43 |
