MCPcopy Create free account
hub / github.com/TeXworks/texworks / fileExists

Method fileExists

src/scripting/ScriptAPI.cpp:359–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

357}
358
359int 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
369Q_INVOKABLE
370QMap<QString, QVariant> ScriptAPI::getDictionaryList(const bool forceReload /* = false */)

Callers 1

LogParserFunction · 0.45

Calls 2

getFilenameMethod · 0.45
absoluteFilePathMethod · 0.45

Tested by

no test coverage detected