Delphi 删除文件函数支持撤销删除


本文整理自网络,侵删。

 
uses ShellAPI;

function DeleteFileWithUndo(sFileName: string): boolean;
var
  fos: TSHFileOpStruct;
begin
  FillChar(fos, SizeOf(fos), 0);
  with fos do
  begin//delphitop.com
    wFunc  := FO_DELETE;
    pFrom  := PChar( sFileName );
    fFlags := FOF_ALLOWUNDO or FOF_NOCONFIRMATION or FOF_SILENT;
  end;
  Result := (0 = ShFileOperation(fos));
end;

相关阅读 >>

Delphi 中文urlencode的简单办法

Delphi 数据集转换json对象

Delphi adoquery查询用户是否存在

Delphi memo1 数字列设定取值范围

Delphi 从twebbrowser webbrowser得到全部html源码

Delphi tstringstream 简单用法

Delphi随机字符(密码生成)函数

Delphi外挂编写

Delphi 病毒

Delphi 一个call应该如何写?

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...