| 49 | }; |
| 50 | |
| 51 | bool FileOperation::doNewDocument(const QString &parentPath, const QString &docName) |
| 52 | { |
| 53 | QFileInfo info(parentPath); |
| 54 | if (!info.exists() || !info.isDir()) |
| 55 | return false; |
| 56 | |
| 57 | QString newFilePath = checkDuplicate(parentPath, docName); |
| 58 | |
| 59 | QFile newFile(newFilePath); |
| 60 | if (newFile.open(QFile::OpenModeFlag::NewOnly)){ |
| 61 | newFile.close(); |
| 62 | } |
| 63 | return true; |
| 64 | } |
| 65 | |
| 66 | bool FileOperation::doNewFolder(const QString &parentPath, const QString &folderName) |
| 67 | { |
nothing calls this directly
no test coverage detected