CURLSMBS Progress Event

When I use CURLSMBS to download a file using SFTP, the various arguments to the Progress event (percent, dlnow, dltotal) hold useful values. When I download a directory listing, however, these values are always 0. My app needs to download very large directory listings and I’d like to be able to display an informative progress bar. Is this a limitation of the MBS CURLS implementation, or of CURLS itself?

In a related question, is it possible to download a directory listing one line at a time? If this were the case then I wouldn’t need to download the whole thing in most cases.

Just a guess, but I doubt whether the directory listing data (vs. an actual file transfer) fires the Progress event at all. If you’re not already, you might set the progress bar to Indeterminate for this part.

It does fire, but with all arguments = 0, as I stated.

I am using an indeterminate progress bar, since the progress data of the event isn’t allowing a quantitative display, but I’d like to have a quantitative progress indication, hence my post.

Yes, I was mistaken to suggest that the data itself “fires” the event. As I understand, the Progress event fires once per second. What I’m doubtful of is whether directory listing data are passed to its parameters.

The only difference at my end between downloading a file and downloading a directory listing is whether or not the URL ends with a “/”; I don’t know where in the bowels of the FTP protocol and/or CURL other differences become significant.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.