You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
680 B
37 lines
680 B
#ifndef FM2_DELETEJOB_H
|
|
#define FM2_DELETEJOB_H
|
|
|
|
#include "../libfmqtglobals.h"
|
|
#include "fileoperationjob.h"
|
|
#include "filepath.h"
|
|
#include "gioptrs.h"
|
|
|
|
namespace Fm {
|
|
|
|
class LIBFM_QT_API DeleteJob : public Fm::FileOperationJob {
|
|
Q_OBJECT
|
|
public:
|
|
explicit DeleteJob(const FilePathList& paths): paths_{paths} {
|
|
}
|
|
|
|
explicit DeleteJob(FilePathList&& paths): paths_{paths} {
|
|
}
|
|
|
|
~DeleteJob() {
|
|
}
|
|
|
|
protected:
|
|
void exec() override;
|
|
|
|
private:
|
|
bool deleteFile(const FilePath& path, GFileInfoPtr inf);
|
|
bool deleteDirContent(const FilePath& path, GFileInfoPtr inf);
|
|
|
|
private:
|
|
FilePathList paths_;
|
|
};
|
|
|
|
} // namespace Fm
|
|
|
|
#endif // FM2_DELETEJOB_H
|