MCPcopy Create free account
hub / github.com/bumptop/BumpTop / deleteFileByName

Method deleteFileByName

trunk/win/Source/BT_FileSystemManager.cpp:319–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319bool FileSystemManager::deleteFileByName(QString filePath, bool silent, bool skipRecycleBin, bool confirm)
320{
321 TCHAR filep[MAX_PATH] = {0};
322 lstrcpy(filep, (LPCTSTR) filePath.utf16());
323
324 SHFILEOPSTRUCT fileOp = { 0 };
325 fileOp.hwnd = winOS->GetWindowsHandle();
326 fileOp.wFunc = FO_DELETE;
327 fileOp.pFrom = filep;
328 fileOp.pTo = L"\0\0";
329 fileOp.fFlags = (skipRecycleBin ? 0 : FOF_ALLOWUNDO) | (confirm ? NULL : FOF_NOCONFIRMATION) | (silent ? FOF_SILENT : 0);
330 bool result = (SHFileOperation(&fileOp) == 0) && !fileOp.fAnyOperationsAborted;
331
332 return result;
333}
334
335bool FileSystemManager::renameFile(FileSystemActor *obj, QString newName, bool confirm)
336{

Callers 13

for_eachFunction · 0.80
for_eachFunction · 0.80
reloadDefaultThemeMethod · 0.80
for_eachFunction · 0.80
onFileAddedMethod · 0.80
onStateChangedMethod · 0.80
for_eachFunction · 0.80
Key_DeleteSceneFilesFunction · 0.80
RemoveLibraryFunction · 0.80
handleMessageMethod · 0.80
onStateChangedMethod · 0.80

Calls 1

GetWindowsHandleMethod · 0.80

Tested by 4

for_eachFunction · 0.64
for_eachFunction · 0.64
onStateChangedMethod · 0.64
onStateChangedMethod · 0.64