MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / clearIntermediateStorage

Method clearIntermediateStorage

ChatView/ChatFileManager.cpp:65–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void ChatFileManager::clearIntermediateStorage()
66{
67 QDir dir(m_intermediateStorageDir);
68 if (!dir.exists()) {
69 return;
70 }
71
72 const QFileInfoList files = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
73 for (const QFileInfo &fileInfo : files) {
74 QFile file(fileInfo.absoluteFilePath());
75 file.setPermissions(QFile::WriteUser | QFile::ReadUser);
76 if (file.remove()) {
77 LOG_MESSAGE(QString("Removed intermediate file: %1").arg(fileInfo.fileName()));
78 } else {
79 LOG_MESSAGE(QString("Failed to remove intermediate file: %1")
80 .arg(fileInfo.fileName()));
81 }
82 }
83}
84
85bool ChatFileManager::isFileAccessible(const QString &filePath)
86{

Callers 3

dispatchSendMethod · 0.80
clearAttachmentFilesMethod · 0.80
loadHistoryMethod · 0.80

Calls 1

fileNameMethod · 0.45

Tested by

no test coverage detected