![]() |
Falkon Develop
Cross-platform Qt-based web browser
|
The QmlFileUtils class, exposed to QML as FileUtils. More...
#include <qmlfileutils.h>
Public Member Functions | |
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 outside the plugin directory then empty string is returned. More... | |
Q_INVOKABLE QByteArray | readAllFileContents (const QString &fileName) |
Read the contents of the file within the plugin directory. More... | |
Q_INVOKABLE bool | exists (const QString &filePath) |
Checks if the file exists within the plugin directory. More... | |
The QmlFileUtils class, exposed to QML as FileUtils.
Definition at line 25 of file qmlfileutils.h.
|
explicit |
Definition at line 25 of file qmlfileutils.cpp.
bool QmlFileUtils::exists | ( | const QString & | filePath | ) |
Checks if the file exists within the plugin directory.
file | path within the plugin directory |
Definition at line 47 of file qmlfileutils.cpp.
QByteArray QmlFileUtils::readAllFileContents | ( | const QString & | fileName | ) |
Read the contents of the file within the plugin directory.
file | path within the plugin directory |
Definition at line 41 of file qmlfileutils.cpp.
QString QmlFileUtils::resolve | ( | const QString & | filePath | ) |
Get the path of the file within the plugin directory. If the filePath provided is resolved to be outside the plugin directory then empty string is returned.
file | path within the plugin directory |
Definition at line 31 of file qmlfileutils.cpp.