文件夹查找文件(一个文件夹文件查找函数 Delphi)
生活随笔
收集整理的這篇文章主要介紹了
文件夹查找文件(一个文件夹文件查找函数 Delphi)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
procedure TfrmMain.SearchPath(path, filename: string; recurse: Boolean;List: TStringList); //recurse 是否包遞歸查找目錄procedure Traverse(APath: string);varf: TSearchRec;I: Integer;beginif recurse thenbeginif FindFirst(APath + filename,faDirectory,f) = 0 thenrepeatif (f.Name[1] <> '.') thenTraverse(IncludeTrailingPathDelimiter(APath + f.Name));until FindNext(f) <> 0;FindClose(f);end;if FindFirst(APath + filename,faReadOnly or faHidden or faSysFile or faArchive, f) = 0 thenrepeatList.Add(APath + f.Name);until FindNext(f) <> 0;FindClose(f);end;
beginTraverse(IncludeTrailingPathDelimiter(path));
end;
轉載于:https://www.cnblogs.com/jackStudy/p/4357511.html
總結
以上是生活随笔為你收集整理的文件夹查找文件(一个文件夹文件查找函数 Delphi)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: android studio升级时提示
- 下一篇: endl与'\n'的区别