File indexing completed on 2024-06-23 05:49:22
0001 /* 0002 This file is part of the Kasten Framework, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2007 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef OKTETATEST_FILESYSTEM_HPP 0010 #define OKTETATEST_FILESYSTEM_HPP 0011 0012 // Qt 0013 #include <QString> 0014 0015 class TestFileSystem 0016 { 0017 public: 0018 explicit TestFileSystem(const QString& name); 0019 TestFileSystem(const TestFileSystem& name) = delete; 0020 ~TestFileSystem(); 0021 0022 public: 0023 TestFileSystem& operator=(const TestFileSystem& name) = delete; 0024 0025 public: 0026 /// tries to remove the given subPath 0027 void removeDir(const QString& subPath); 0028 /// tries to create the given subPath 0029 void createDir(const QString& subPath); 0030 /// 0031 QString createFilePath(const QString& fileName, const QString& subPath = QString()); 0032 0033 private: 0034 void _removeDir(const QString& path); 0035 /// tries to create the given subPath 0036 void _createDir(const QString& path); 0037 0038 private: 0039 QString mBasePath; 0040 }; 0041 0042 #endif