描述:創建一個目錄,不包含多級目錄(多級目錄使用System.SysUtils.ForceDirectories,Vcl.FileCtrl.ForceDirectories已過時)
CreateDirectory(Path: );
參數一:給定的路徑如D:\aa,非完整路徑如aa則在程序當前目錄下創建
完整代碼
= Edit_Dir.Text <> //= MessageDlg( Flag = IDYES Flag = IDNO selectDirectory(, , Dir) // selectDirectory(, , Dir) Trim(Edit_Dir.Text) = , mtInformation, [mbOK], TDirectory.Exists(Edit_Dir.Text) + E.Message, mtError, [mbOK], , mtError, [mbOK], =.
= = [ .. ] Char = (, , , , , , , ); // [ .. ] = (, , , , , , ); // Trim(Edit_Path.Text) = , mtError, [mbOK], = I := Length(InvalidChrs) Pos(InvalidChrs[i], Dir2) <> , mtError, [mbOK], I := Length(InvalidStrs) InvalidStrs[I] = LowerCase(Dir2) , mtError, [mbOK], AnsiLastChar(sDir) = //= sDir += sDir + +.
效果演示: