DtkCore
DTK Core module
|
Public 类型 | |
enum | Mode { Auto , Snap , Test } |
enum class | XDG { DataHome , ConfigHome , CacheHome , RuntimeDir , StateHome } |
About XDG dir, view it in https://gitlab.freedesktop.org/xdg/xdg-specs/ | |
enum class | DSG { AppData , DataDir } |
静态 Public 成员函数 | |
static QString | writableLocation (QStandardPaths::StandardLocation type) |
DStandardPaths提供兼容Snap/Dtk标准的路径模式。DStandardPaths实现了Qt的QStandardPaths主要接口。此处返回可写路径 | |
static QStringList | standardLocations (QStandardPaths::StandardLocation type) |
DStandardPaths提供兼容Snap/Dtk标准的路径模式。DStandardPaths实现了Qt的QStandardPaths主要接口。此处返回所有Standardpath | |
static QString | locate (QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options=QStandardPaths::LocateFile) |
在 type 的标准位置查找名为 fileName 的文件或目录。选项标志允许您指定是否查找文件或目录。默认情况下,此标志设置为 LocateFile。返回找到的第一个文件或目录的绝对路径,否则返回空字符串。 | |
static QStringList | locateAll (QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options=QStandardPaths::LocateFile) |
在类型的标准位置中按名称 fileName 查找所有文件或目录。选项标志允许您指定是否查找文件或目录。默认情况下,此标志设置为 LocateFile。返回找到的所有文件的列表。 | |
static QString | findExecutable (const QString &executableName, const QStringList &paths=QStringList()) |
同QStandardPaths::findExecutable, 查找可执行文件 | |
static void | setMode (Mode mode) |
同QStandardPaths::setTestModeEnabled, 设置是否是测试模式 | |
static QString | homePath () |
返回家目录 | |
static QString | homePath (const uint uid) |
用uid返回家目录 | |
static QString | path (XDG type) |
static QString | path (DSG type) |
static QStringList | paths (DSG type) |
返回所有DSG下所有目录 | |
static QString | filePath (XDG type, QString fileName) |
static QString | filePath (DSG type, QString fileName) |