summaryrefslogtreecommitdiff
path: root/src/libs/utils/fileutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/utils/fileutils.h')
-rw-r--r--src/libs/utils/fileutils.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libs/utils/fileutils.h b/src/libs/utils/fileutils.h
index fd8f4f7422..d840c350af 100644
--- a/src/libs/utils/fileutils.h
+++ b/src/libs/utils/fileutils.h
@@ -128,6 +128,29 @@ using FilePathList = QList<FilePath>;
using FileName = FilePath;
using FileNameList = FilePathList;
+class QTCREATOR_UTILS_EXPORT CommandLine
+{
+public:
+ CommandLine() {}
+
+ CommandLine(const FilePath &executable, const QString &arguments)
+ : m_executable(executable), m_arguments(arguments)
+ {}
+
+ void addArg(const QString &arg);
+ void addArgs(const QStringList &inArgs);
+ void addArgs(const QString &inArgs);
+
+ QString toUserOutput() const;
+
+ FilePath executable() const { return m_executable; }
+ QString arguments() const { return m_arguments; }
+
+private:
+ FilePath m_executable;
+ QString m_arguments;
+};
+
class QTCREATOR_UTILS_EXPORT FileUtils {
public:
static bool removeRecursively(const FilePath &filePath, QString *error = nullptr);