1 /* 2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com> 3 SPDX-License-Identifier: GPL-2.0-or-later 4 */ 5 6 #ifndef KSPATHS_H_ 7 #define KSPATHS_H_ 8 #include <QStandardPaths> 9 #include <QDir> 10 11 /** 12 *@class KSPaths 13 *@short Wrapper for QStandardPaths with Android assets support 14 *The purpose of this class is to search for resources on some platforms with paths that are not 15 *provided by QStandardPaths (e.g. assets:/ on Android). 16 *@author Artem Fedoskin, Jasem Mutlaq 17 *@version 1.0 18 */ 19 20 class KSPaths 21 { 22 public: 23 static QString locate(QStandardPaths::StandardLocation location, const QString &fileName, 24 QStandardPaths::LocateOptions options = QStandardPaths::LocateFile); 25 static QStringList locateAll(QStandardPaths::StandardLocation, const QString &fileNames, 26 QStandardPaths::LocateOptions options = QStandardPaths::LocateFile); 27 static QString writableLocation(QStandardPaths::StandardLocation type); 28 }; 29 #endif 30