MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / createPath

Method createPath

source/src/macro.h:370–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368 return Qi::macroDir + name + QString("/") + makeName(macroName) + file_type;
369 }
370 QString makePath() const
371 {
372 if (base) return Qi::macroDir;
373 return Qi::macroDir + name + QString("/");
374 }
375 bool createPath() const
376 {
377 QString path = Qi::macroDir;
378 if (!QDir(path).exists() && !QDir(path).mkdir(path))
379 {
380 MsgBox::Error(lang_trans("创建宏目录失败").toStdWString());
381 return false;
382 }
383 if (!base)
384 {
385 path += name + QString("/");
386 if (!QDir(path).exists() && !QDir(path).mkdir(path))
387 {
388 MsgBox::Error(lang_trans("创建分组目录失败").toStdWString());
389 return false;
390 }
391 }

Callers

nothing calls this directly

Calls 1

ErrorEnum · 0.85

Tested by

no test coverage detected