wie genau benutze ich diese procedure?
Delphi-Quellcode:
procedure GetSubDirs(const sRootDir: string; slDirectories: TStrings);
var
srSearch: TSearchRec;
sSearchPath: string;
slSub: TStrings;
begin
Screen.Cursor := crHourGlass;
slSub := TStringList.Create;
slDirectories.BeginUpdate;
try
sSearchPath := sRootDir;
if FindFirst(sSearchPath + '*', faDirectory, srSearch) = 0 then
repeat
if ((srSearch.Attr and faDirectory) = faDirectory) and
(srSearch.Name <> '.') and
(srSearch.Name <> '..') then begin
slDirectories.Add(sSearchPath + srSearch.Name);
slSub.Add(sSearchPath + srSearch.Name);
end;
until
(FindNext(srSearch) <> 0);
FindClose(srSearch);
finally
slDirectories.EndUpdate;
FreeAndNil(slSub);
Screen.Cursor := crDefault;
end;
end;
also wie rufe ich sie auf?
wenn ich jetzt das ergebnis in ein memo reinschreiben lassen will.