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
10QT_REQUIRE_CONFIG(filesystemwatcher);
11
12QT_BEGIN_NAMESPACE
13
14
15class QFileSystemWatcherPrivate;
16
17class Q_CORE_EXPORT QFileSystemWatcher : public QObject
18{
19 Q_OBJECT
20 Q_DECLARE_PRIVATE(QFileSystemWatcher)
21
22public:
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
35Q_SIGNALS:
36 void fileChanged(const QString &path, QPrivateSignal);
37 void directoryChanged(const QString &path, QPrivateSignal);
38};
39
40QT_END_NAMESPACE
41
42#endif // QFILESYSTEMWATCHER_H
43

source code of qtbase/src/corelib/io/qfilesystemwatcher.h