33 QString resolvedPath = m_path +
QL1C(
'/') + filePath;
34 resolvedPath = QDir::cleanPath(resolvedPath);
35 if (resolvedPath.contains(m_path)) {
43 const QString path =
resolve(fileName);
49 const QString path =
resolve(filePath);
50 return QFile(path).exists();
QmlFileUtils(const QString &filePath, QObject *parent=nullptr)
Q_INVOKABLE QString resolve(const QString &filePath)
Get the path of the file within the plugin directory. If the filePath provided is resolved to be outs...
Q_INVOKABLE QByteArray readAllFileContents(const QString &fileName)
Read the contents of the file within the plugin directory.
Q_INVOKABLE bool exists(const QString &filePath)
Checks if the file exists within the plugin directory.