win10文件粉碎機 怎樣用delphi刪除一個文件夾(文件夾中含多層文件)?
怎樣用delphi刪除一個文件夾(文件夾中含多層文件)?函數TData1.DeleteDirectory(const來源:String):booleanvar fo:tshfileopstructbe
怎樣用delphi刪除一個文件夾(文件夾中含多層文件)?
函數TData1.DeleteDirectory(const來源:String):booleanvar fo:tshfileopstructbeing FillChar(fo,SizeOf(fo),0)with fo do begin Wnd:=0 wFunc:=fo?u DELETE pFrom:=PChar(source?0)pTo:=PChar(source?0)fFlags:=FOF?u NOCONFIRMMKDIR end Result:=(SHFileOperation(fo)=0)end這