I am using FileInfo method CopyTo to copy some large files. I am using BackgroundWorker to do this in a separate thread.
The problem is that I would like to update a progress bar, but I can only update that between each file copy which is not often enough. There is also a similar problem with CancellationPending (and I don't know how to cancel the ongoing CopyTo without killing the thread).
What is the best option here? The most obvious is to copy the files in smaller chunks instead of using CopyTo. That would be ok, but I don't want to lose any performance (e.g. dma not being used efficiently).