| Код | var FtpHandle,InetHandle, hFind: HInternet; s:WIN32_FIND_DATA;
procedure TForm1.Button2Click(Sender: TObject); begin InetHandle := InternetOpen(PChar('FTP'), 0, nil, nil, 0); FtpHandle := InternetConnect(InetHandle, PChar('10.10.11.8'), 21, PChar('Anonymous'), PChar('qwerty.ru'), INTERNET_SERVICE_FTP, 0, 255); if not Assigned(FtpHandle) then InternetCloseHandle(InetHandle) else
try hFind:= FtpFindFirstFile(FtpHandle, PChar('*.*'), s, FTP_TRANSFER_TYPE_BINARY, 255); except exit; end; ListBox1.Items.Add(s.cFileName + ' | ' + intToStr(s.dwFileAttributes)); while InternetFindNextFile(hFind, @s) do begin ListBox1.Items.Add(s.cFileName + ' | ' + intToStr(s.dwFileAttributes)) end; InternetCloseHandle(InetHandle); end;
|
Как мне узнать возможна ли запись файла в некую директорию??? s.dwFileAttributes - возвращает помоему не то значение |