File indexing completed on 2024-04-21 05:48:30

0001 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0002 // SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
0003 
0004 #pragma once
0005 
0006 #include "fileTree.h"
0007 
0008 // Tiny helper class to defer file deletion into a thread. The Files are being held until actual cleanup.
0009 class FileCleaner : public QObject
0010 {
0011 public:
0012     static FileCleaner *instance();
0013     void clean(const QList<std::shared_ptr<File>> &files);
0014 
0015 private:
0016     using QObject::QObject;
0017     Q_INVOKABLE void cleanUp(QList<std::shared_ptr<File>> files);
0018 };