FtpDirectoryEntryDate

Internet ››
Parent Previous Next

FtpDirectoryEntryDate

Синтаксис

Function FtpDirectoryEntryDate() As String

Описание

Возвращает дату и время записи файла на удаленном FTP сервере при перечислении. Для использования функции нужно создать класс на базе FTPINFO!

Параметры

нет

Платформы

Windows

Пример

#Include "window9.bi"
Dim As HINTERNET hOpen,hConnect,hFind
hOpen = InetOpen()
If hOpen<>0 Then
  hConnect = FtpConnect(hOpen,"ftp.intel.com","anonymous","anonymous",,INTERNET_FLAG_PASSIVE)
  If hConnect<>0 Then
     Dim As FTPINFO ftpinfo_ ' Создаем класс перечисления
     hFind = ftpinfo_.FtpExamineDirectory(hConnect,"", "*.*")
     If hFind Then
        Do
           ' Будем искать только папки
           If ftpinfo_.FtpDirectoryEntryAttributes() And FILE_ATTRIBUTE_DIRECTORY  Then
              Print ftpinfo_.FtpDirectoryEntryName(),_
              ftpinfo_.FtpDirectoryEntryDate(),_
              ftpinfo_.FtpDirectoryEntrySize()
           EndIf
        Loop While ftpinfo_.FtpNextDirectoryEntry(hFind)
        FtpFinishDirectory(hFind)
     EndIf
  EndIf
  InetFreeHandle(hConnect)
  InetFreeHandle(hOpen)
  sleep
EndIf

Результат

Pub 16.06.2011 04:00:00 0
images 20.01.2011 04:00:00 0

Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator