Read Files & Folders from FTP

Hi All,

I would like to read one directory from FTP server by providing username & password.

This folder will contain sub folders and files. I would like to show all those folders and files using Tree.

Is there any code how to read files from FTP & write files to FTP server using Vaadin.


Well it depends on the FTP framework you use to fetch data. If it returns an own implementation out of File then there might be a chance that you could use FilesystemContainer directly. Otherwise you would have to use a HierarchicalContainer and convert the folders and files the FTP framework gives you into item, and set the parent/child relations yourself. Another option is to extend HierarchicalContainer yourself and implement getChildren etc, to call the FTP.