Is there any way to deal with situation when you need to get list of all directories on a FTP server, where the number of directories is so big that it takes too long to get it and operation fails with timeout?
I wonder if there are some libraries that let you do that somehow?
Try something like this