zoukankan      html  css  js  c++  java
  • Inno Setup 删除文件夹 DelTree

    Pascal Scripting: DelTree

    Prototype:

    function DelTree(const Path: String; const IsDir, DeleteFiles, DeleteSubdirsAlso: Boolean): Boolean;

    Description:

    Deletes the specified directory if IsDir is set to True, or files/directories matching a wildcard if IsDir is set to False. Returns True if it was able to successfully remove everything.

    If DeleteFiles is set to True, files inside the specified directory will be deleted if IsDir is True, or files matching the specified wildcard (including those with hidden, system, and read-only attributes) will be deleted if IsDir is False.

    If DeleteFiles and DeleteSubdirsAlso are both set to True, subdirectories (and their contents) will be deleted in addition to files.

    Remarks:

    This function will remove directories that are reparse points, but it will not recursively delete files/directories inside them.

    Example:
    begin
      // Delete the directory C:Test and everything inside it
      DelTree('C:Test', True, True, True);
    
      // Delete files matching C:Test*.tmp
      DelTree('C:Test*.tmp', False, True, False);
    
      // Delete all files and directories inside C:Test
      // but leave the directory itself
      DelTree('C:Test*', False, True, True);
    end;
  • 相关阅读:
    我深知黑暗,但心向光明(记毕业后第一次在北京求职)
    CF 1200E HASH模板
    CF580D
    CF1433F
    CF1451 E1交互题
    11.23-11.29 训练计划
    11.22 CF总结 #682
    sql问题:备份集中的数据库备份与现有的 '办公系统' 数据库不同
    内容导出成word
    让超链接无法跳转的方法
  • 原文地址:https://www.cnblogs.com/liujx2019/p/11835619.html
Copyright © 2011-2022 走看看