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.