How to check the UNEXISTENCE of a directory on an FTP server in Delphi?

1

I use Delphi and Lazarus to create my applications, what should I do to verify the nonexistence of a directory contained on an FTP Server ?

For example, when you check the nonexistence of a local file , use the following commands:

(if not DirectoryExists('C:\Teste') then)

How to do the same on an FTP server?

    
asked by anonymous 03.04.2016 / 02:32

1 answer

1

If you use Indy (see www.indyproject.org/Sockets/index.EN.aspx), this library has a component called TIdFTP that has the List () method and the DirectoryListing property. Run List () and then process the results in DirectoryListing to check what files and directories are present on the server.

    
05.04.2016 / 12:12