1
Google 검색을 시도했지만 xcode를 통해 Mac에서 파일 및 폴더를 검색하는 데 필요한 정보가 거의 없습니다.파일 및 폴더 용 드라이브 검색
어떻게 할 수 있습니까? 모든 코드 샘플 등.
델파이에서 프로그램하는 데 익숙했지만 경로 검색을위한 스 니펫은 여기에 있습니다.
procedure SearchFolders(path:string);
var
sr : tsearchrec;
res: integer;
i:integer;
begin
path:= includetrailingpathdelimiter(path);
res:= findfirst(path+'*.*',faAnyfile,sr);
while res = 0 do begin
application.processmessages;
if (sr.name <> '.') and (sr.name <> '..') then
if DirectoryExists(path + sr.name) then
SearchFolders(path + sr.name)
else
FileProcess.Add(path + sr.name);
FileSize:=FileSize+sr.Size;
res := findnext(sr);
end;
findclose(sr);
end;
활성화하려면 해당 SearchFolders ('C : \'); 경로를 검색하여 문자열 목록에 저장합니다.
xcode 내에서 osx를 어떻게 처리합니까?