vfp如何删除文件并清空回收站
用如下代码删除文件名文件夹后,都进回收站了,请问如何直接删除,不进回收站呢?程序代码:
***删除文件夹 **调用格式deldirapiover('d:\tmp') PARAMETERS cPath cPath=ALLTRIM(cPath) cPath=LEFT(cPath,LEN(cPath)-IIF(RIGHT(cPath,1)=='\',1,0)) DECLARE LONG GetProcessHeap IN Kernel32 DECLARE LONG HeapAlloc IN Kernel32 LONG, LONG, LONG DECLARE LONG HeapFree IN Kernel32 LONG, LONG, LONG DECLARE LONG HeapDestroy IN Kernel32 LONG DECLARE LONG SHFileOperation IN Shell32 STRING@ ** 删除文件,包括删除整个文件夹。 LOCAL hHeap, pFileName, stFileOp, bRet cFileName = cPath + 0h0000 bRet = .T. TRY hHeap = GetProcessHeap() pFileName = HeapAlloc(hHeap, 8, LEN(cFileName)) SYS(2600, pFileName, LEN(cFileName), cFileName) stFileOp = REPLICATE(0h00, 4) + BINTOC(3, "4RS") + BINTOC(pFileName, "4RS") + REPLICATE(0h00, 4) + BINTOC(80, "2RS") + REPLICATE(0h00, 12) bRet = (SHFileOperation(@stFileOp) == 0) CATCH bRet = .F. ENDTRY HeapFree(hHeap, 1, pFileName) HeapDestroy(hHeap) CLEAR DLLS RETURN bRet