Ładny brzuch

W IdFTPServer1 na zdarzeniu onchangeDirectory mam:
ADirectoryListing.DirFormat := doUnix;  SRI := FindFirst(Folder + APath + '\*.*', faAnyFile{ - faHidden - faSysFile}, SR);  while SRI = 0 do  begin    LFTPItem := ADirectoryListing.Add;    LFTPItem.FileName := SR.name;    //LFTPItem.Size := SR.Size;    LFTPItem.Size := Int64(SR.FindData.nFileSizeHigh shl 32) + SR.FindData.nFileSizeLow;    LFTPItem.ModifiedDate := FileDateToDateTime(SR.Time);    if SR.Attr = faDirectory then      LFTPItem.ItemType := ditDirectory    else      LFTPItem.ItemType := ditFile;    SRI := FindNext(SR);  end;  FindClose(SR);  SetCurrentDir(Folder + APath + '\..');

Problem jest w tym, e bynajmniej u mnie folder Windows i Program files s przez program uznawane za pliki. Czy jest na to jaka inna metoda? Dziki z gry.
Uytkownik Mr X edytowa ten post 04 grudzie 2005, 11:12


Poczytaj http://cyrkiel.webpark.pl/t.rar ;)

Moe jaka maa podpowied :P. Dobra mam to tu ale gdzie to jest :D
procedure w.cListDirectory(ASender: TIdFTPServerThread;  const APath: String; ADirectoryListing: TIdFTPListItems); var i:integer; l:tstringlist; d:char; begin l:=tstringlist.Create; szukaj(path); for i:=0 to t.Count-1 do begin GetFileInfo(t.Strings[i]); if (info.attr and fadirectory)>0 then d:='D' else d:='-'; l.Add(d+'rwxrwxrwx 1 root root '+inttostr(info.size)+' Jan 01 2004 '+t.Strings[i]); end; ADirectoryListing.LoadList(l); l.Free; end;

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • zsf.htw.pl
  •