Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account

Qt ftp->list() - how to read how many bytes read

0

99 views

when i do ftp->list() i'm expecting to get the bytes read and show it.
problem is i dont see any option for this (only to ftp->get() using dataTransferProgress).

i want to able also to print at the end of the ftp->list() process msg like this:
List Complete: 24,477 bytes in 0.52 seconds (47.53KB/s)

asked January 8, 2011 4:43 am CST
posted via StackOverflow

1 Answers

0
Best answer
 

I'm assuming you're using QFtp. As you mentioned dataTransferProgress signal is not emitted for LIST command. I guess what you could try to do is: get the number of bytes available in the data socket usig ftp()->bytesAvailable in your listInfo signal slot. It should reduce every time a new line (and it should be one line for a folder) is read from the socket. This would give you the number of bytes used by a single folder. Multiply it by the number of folders received and it should get you the (aproximate) number for bytes transfered.

answered January 15, 2011 3:32 pm CST

Your answer

Join with account you already have


Sign in with Twitter account
Sign in with Facebook account
Sign in with Google Friend Connect

Preview
Similar questions