Delphi RemoveDir 删除文件夹


本文整理自网络,侵删。

 //删除文件夹 RemoveDir; RemoveDirectory
var
dir: string;
begin
dir := 'c:\temp';
RemoveDir(dir); //返回 Boolean

//或者用系统 API:
RemoveDirectory(PChar(dir)); //返回 Boolean
end;

========================

function RemoveDir(const Dir: string): Boolean;
begin
{$IFDEF MSWINDOWS}
Result := RemoveDirectory(PChar(Dir));
{$ENDIF}
{$IFDEF LINUX}
Result := __rmdir(PChar(Dir)) = 0;
{$ENDIF}
end;

相关阅读 >>

Delphi : tstringlist的find,indexof和sort

Delphi api �c multibytetowidechar的用法

Delphi idhttp中get 图像链接通过memorystream加载 image控件显示

Delphi gethomepath - 获取用户程序数据目录

Delphi insert 插入一个字符(串)

Delphi opendialog1 打开多个文件

Delphi实现屏幕截图、窗口截图、指定区域截图

Delphi android adb usb上读取设备信息

Delphi中用socket解析域名获得ip地址

Delphi idhttp post 普通提交乱码处理

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



打赏

取消

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

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

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

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

评论

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