DtkCore
DTK Core module
载入中...
搜索中...
未找到
dtrashmanager.h
浏览该文件的文档.
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
13DCORE_BEGIN_NAMESPACE
14
15class DTrashManagerPrivate;
16class LIBDTKCORESHARED_EXPORT DTrashManager : public QObject, public DObject
17{
18public:
20
21 bool trashIsEmpty() const;
22 bool cleanTrash();
23 bool moveToTrash(const QString &filePath, bool followSymlink = false);
24
25protected:
27
28private:
29 D_DECLARE_PRIVATE(DTrashManager)
30};
31
32DCORE_END_NAMESPACE
33
34#endif // DTRASHMANAGER_H
Definition dobject.h:25
Definition dtrashmanager.h:17
static DTrashManager * instance()
获取DTrashManager的实例
bool trashIsEmpty() const
判断回收站是否为空
bool cleanTrash()
清空回收站
bool moveToTrash(const QString &filePath, bool followSymlink=false)
将文件移动到回收站