Debian Codegraph @

include/filesystem/dtrashmanager.h

raw
1 // SPDX-FileCopyrightText: 2017 - 2022 UnionTech Software Technology Co., Ltd.
2 //
3 // SPDX-License-Identifier: LGPL-3.0-or-later
4
5 #ifndef DTRASHMANAGER_H
6 #define DTRASHMANAGER_H
7
8 #include <dtkcore_global.h>
9 #include <DObject>
10
11 #include <QObject>
12
13 DCORE_BEGIN_NAMESPACE
14
15 class DTrashManagerPrivate;
16 class LIBDTKCORESHARED_EXPORT DTrashManager : public QObject, public DObject
17 {
18 public:
19 static DTrashManager *instance();
20
21 bool trashIsEmpty() const;
22 bool cleanTrash();
23 bool moveToTrash(const QString &filePath, bool followSymlink = false);
24
25 protected:
26 DTrashManager();
27
28 private:
29 D_DECLARE_PRIVATE(DTrashManager)
30 };
31
32 DCORE_END_NAMESPACE
33
34 #endif // DTRASHMANAGER_H