ExamineFTPDirectory()

Syntax

Result = ExamineFTPDirectory(#Ftp)
Description
Starts to examine the content of the current FTP directory.

Parameters

#Ftp The connection to use.

Return value

Returns nonzero if the operation succeeded or zero if it failed.

Remarks

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 information. 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 that 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.

The functions NextFTPDirectoryEntry(), FTPDirectoryEntryName(), FTPDirectoryEntryType(), FTPDirectoryEntryAttributes(), FTPDirectoryEntryDate() and FTPDirectoryEntrySize() can be used to read the directory entries. To change the current directory, use SetFTPDirectory().

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

See Also

NextFTPDirectoryEntry(), FinishFTPDirectory()

Supported OS

All

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