本文整理自网络,侵删。
uses ioutils, Types //获取指定目录下的文件与子目录procedure TForm1.Button1Click(Sender: TObject);var dfs: TStringDynArray; str: string;begin dfs := TDirectory.GetFileSystemEntries(path); Memo1.Clear; for str in dfs do Memo1.Lines.Add(str);end;
相关阅读 >>
Delphi stringgrid 实例3: 本例功能: 1、修改 tstringgrid的默认宽与高; 2、添加行; 3、确认当前单元并赋值.
Delphi removewhitespaces 过滤字符串所有空格
更多相关阅读请进入《Delphi》频道 >>