在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
procedure TfrmMain.SearchPath(path, filename: string; recurse: Boolean; List: TStringList); //recurse 是否包递归查找目录 procedure Traverse(APath: string); var f: TSearchRec; I: Integer; begin if recurse then begin if FindFirst(APath + filename,faDirectory,f) = 0 then repeat if (f.Name[1] <> '.') then Traverse(IncludeTrailingPathDelimiter(APath + f.Name)); until FindNext(f) <> 0; FindClose(f); end; if FindFirst(APath + filename,faReadOnly or faHidden or faSysFile or faArchive, f) = 0 then repeat List.Add(APath + f.Name); until FindNext(f) <> 0; FindClose(f); end; begin Traverse(IncludeTrailingPathDelimiter(path)); end; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论