Initial implimentation of win32_trash()

This commit is contained in:
dolphin6k 2021-10-28 22:47:32 +09:00
parent 75d209e3f1
commit 61ce0798d9
3 changed files with 29 additions and 1 deletions

13
src/win32_trash.c Normal file
View file

@ -0,0 +1,13 @@
#include <windows.h>
int win32_trash(char *path);
int win32_trash(char *path)
{
SHFILEOPSTRUCT op;
op.wFunc = FO_DELETE;
op.pFrom = path;
op.fFlags = FOF_SILENT|FOF_ALLOWUNDO;
return SHFileOperationA(&op);
}