ExamineFTPDirectory()

Syntax

Result = ExamineFTPDirectory(#Ftp)
Description
Start to examine the current #Ftp directory for future listing with functions NextFTPDirectoryEntry(), FTPDirectoryEntryName(), FTPDirectoryEntryType(), FTPDirectoryEntryAttributes(), FTPDirectoryEntryDate() and FTPDirectoryEntrySize(). To change the current directory, use SetFTPDirectory(). If 'Result' is 0, the directory can not be examine.

Note: for now, only unix-like servers are supported for directory listing. The FTP protocol doesn't specify how a directory listing has to be returned, so every server has its own way to returns the directory informations. Fortunately, most of the world servers are running under unix/linux and uses the same way to return the data. That said, there is no warranty than the listing works on every servers. This command will be updated on demand to automatically handle more servers type. If the server isn't supported, please use FTPDirectoryEntryRaw() to get back the raw information about each entry.

Example:

  InitNetwork()
  
  If OpenFTP(0, "ftp.free.fr", "anonymous", "")
    If ExamineFTPDirectory(0)
      While NextFTPDirectoryEntry(0)
        Debug FTPDirectoryEntryName(0)
      Wend
    EndIf
  Else
    Debug "Can't connect to ftp.free.fr"
  EndIf

Supported OS

All

<- DeleteFTPFile() - Ftp Index - FTPDirectoryEntryAttributes() ->