2011-04-06 13:48:02 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Duncan Mac-Vicar P. <duncan@kde.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
2011-03-18 03:14:45 +03:00
|
|
|
|
|
|
|
#ifndef MIRALL_FILEUTILS_H
|
|
|
|
#define MIRALL_FILEUTILS_H
|
|
|
|
|
2011-03-21 00:43:03 +03:00
|
|
|
#include <QStringList>
|
2011-03-18 03:14:45 +03:00
|
|
|
|
|
|
|
namespace Mirall
|
|
|
|
{
|
|
|
|
|
|
|
|
class FileUtils
|
|
|
|
{
|
|
|
|
public:
|
2011-03-21 00:43:03 +03:00
|
|
|
enum SubFolderListOption {
|
|
|
|
SubFolderNoOptions = 0x0,
|
2013-07-30 16:37:46 +04:00
|
|
|
SubFolderRecursive = 0x1
|
2011-03-21 00:43:03 +03:00
|
|
|
};
|
|
|
|
Q_DECLARE_FLAGS(SubFolderListOptions, SubFolderListOption)
|
|
|
|
|
|
|
|
static QStringList subFoldersList(QString folder,
|
|
|
|
SubFolderListOptions options = SubFolderNoOptions );
|
2011-03-18 03:14:45 +03:00
|
|
|
static bool removeDir(const QString &path);
|
|
|
|
};
|
|
|
|
|
2011-03-21 00:43:03 +03:00
|
|
|
Q_DECLARE_OPERATORS_FOR_FLAGS(FileUtils::SubFolderListOptions)
|
|
|
|
|
2011-03-18 03:14:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|