I currently use the ftp crate to clone a directory from a location on an ftp server. The ftp crate has options for getting a directory listing so I created a recursive function to scan through all directories. This appears to work well, but I am wondering if it is possible to use the walkdir crate to do this instead?
I have tested walkdir on my local filesystem and it works great but I am wondering if there is someway to use it with an instance of an ftp client? I suspect that this is not possible (since walkdir seems to expect a path reference) but I thought I would ask to see if anyone has any ideas. Below are some snippets for how I am using the ftp crate.
let mut client = FtpStream::connect(&address)?;
//change to remote directory
//get list of directories and files as a vector
let contents = client.list(Some("./"))?;