0 votes
by (120 points)

I'm using Rebex FTP library. My question is about making treeview from directories and files on the server. I don't know how make dynamic loading. There is a tree with main folders, I'm click on one Node and library load from FTP content of this folder like in many FTP Clients. How I can make this?

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (70.2k points)

To implement requested functionality, use these methods:

  • Ftp.ChangeDirectory()
  • Ftp.GetList()

The rest is up to you. You can start with a sample code I've made for you.

Please note, that some servers don't accept full paths for changing directories (the ChangeDirectory method) and some servers don't use slash '/' as directory separator.

Because of this, I've made two examples - FtpTreeViewSimple and FtpTreeView (see mentioned sample code). The first one demonstrates how to make dynamically built TreeViews. Second one extends the first one to show how to navigate in a FTP folder structure without necessity to use full paths or any directory separators.

...