Hey folks,

I am designing a utility that will take a directory and send it to another machine over my LAN via TCP.

My questions to you are:

For the network transfer itself -- I'm not sure if I should start with QAbstractSocket or QTCPSocket. For my objective, would there be any perks to using one over the other?

Second, what is going to be the cleanest and most convenient way of writing an entire directory hierarchy (containing sub directories and files) to the socket? Ideally, I would like to have a single file stream that I can pass to the socket instead of having to recurse through each component of the directory, while retaining the structure so it can be reconstructed at the other end of the transfer.

Is there a pre-defined Qt class to accomplish this? I've read through the documentation and am not sure if I can point a QDataStream object to a directory in the file system and have it read in the entire directory tree as a binary stream.

I thought about using libtar to create a tar stream -- this would give me a single file stream, but it's a grotty c-style library. Ideally, I'd like to do it using Qt. I have been digging through the API and the forum as well to try to answer these two questions. I appreciate any help you can provide (sample code is helpful too if anyone has any).

Thanks in advance.