MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / GetResoucePathFromFile

Function GetResoucePathFromFile

src/database/WizDatabase.cpp:64–79  ·  view source on GitHub ↗

* @brief 从HTML文件的路径获取想要的资源文件夹路径 * @param strHtmlFileName * @return */

Source from the content-addressed store, hash-verified

62 * @return
63 */
64QString GetResoucePathFromFile(const QString& strHtmlFileName)
65{
66 if (strHtmlFileName.isEmpty() || !QFile::exists(strHtmlFileName))
67 return QString();
68
69 QString strTitle = Utils::WizMisc::extractFileTitle(strHtmlFileName);
70 QString strPath = Utils::WizMisc::extractFilePath(strHtmlFileName);
71 QString strPath1 = strPath + strTitle + "_files/";
72 QString strPath2 = strPath + strTitle + ".files/";
73 if (QFile::exists(strPath1))
74 return strPath1;
75 if (QFile::exists(strPath2))
76 return strPath2;
77
78 return QString();
79}
80
81
82class WizUserCertPassword

Callers 1

updateDocumentDataMethod · 0.85

Calls 2

isEmptyMethod · 0.80
QStringClass · 0.70

Tested by

no test coverage detected