Thema: Delphi Dir Exists idftp

Einzelnen Beitrag anzeigen

ferby

Registriert seit: 15. Aug 2004
Ort: Wien
841 Beiträge
 
Delphi 2010 Enterprise
 
#3

Re: Dir Exists idftp

  Alt 17. Aug 2008, 20:11
Okay,

hab mir selbst was gebastelt,
funktioniert so weit


Delphi-Quellcode:
function TMyFtp.dir_exists(dir_name: string):boolean;
var
  list_directories: TStringList;
  i : integer;
begin
  list_directories := TStringList.create;

  result:=false;

  idftp.List(list_directories, '', true);

  for i := list_directories.Count - 1 downto 0 do
  if (list_directories.Strings[i][1]='d') and (list_directories.Strings[i]<>'..') and (list_directories.Strings[i]<>'.') then
  begin
    DivStrList.Str := list_directories.Strings[i];
    if dir_name = DivStrList.Items[DivStrList.Count -1] then
    begin
      result:=true;
      list_directories.Free;
      exit
    end
  end

end;
  Mit Zitat antworten Zitat