| 357 | } |
| 358 | |
| 359 | int ScriptAPI::fileExists(const QString& filename) const |
| 360 | { |
| 361 | QDir scriptDir(QFileInfo(m_script->getFilename()).dir()); |
| 362 | QString path = scriptDir.absoluteFilePath(filename); |
| 363 | |
| 364 | if (!mayReadFile(path, m_target)) |
| 365 | return SystemAccess_PermissionDenied; |
| 366 | return (QFileInfo(path).exists() ? SystemAccess_OK : SystemAccess_Failed); |
| 367 | } |
| 368 | |
| 369 | Q_INVOKABLE |
| 370 | QMap<QString, QVariant> ScriptAPI::getDictionaryList(const bool forceReload /* = false */) |
no test coverage detected