MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / FileRecycleEmpty

Method FileRecycleEmpty

source/script_autoit.cpp:1337–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1335
1336
1337ResultType Line::FileRecycleEmpty(LPTSTR aDriveLetter)
1338{
1339 LPCTSTR szPath = *aDriveLetter ? aDriveLetter : NULL;
1340 HRESULT hr = SHEmptyRecycleBin(NULL, szPath, SHERB_NOCONFIRMATION | SHERB_NOPROGRESSUI | SHERB_NOSOUND);
1341 // Throw no error for E_UNEXPECTED, since that is returned in the common case where the
1342 // recycle bin is already empty. Seems more useful and user-friendly to ignore it.
1343 if (hr != S_OK && hr != E_UNEXPECTED)
1344 return g_script.Win32Error(hr);
1345 return OK;
1346}
1347
1348
1349

Callers

nothing calls this directly

Calls 1

Win32ErrorMethod · 0.80

Tested by

no test coverage detected