spacedrive
spacedrive copied to clipboard
Eng 1159: report progress when copying files
This fixes the reporting of progress when copying files.
The initial idea was to split the file into chunks and, at every couple of chunks transmitted, we would emit an event reporting the progress of the current copy.
But that proved a poor approach and didn't pay for its unnecessary complexity.
The current implementation (WIP), uses a less intrusive metric: spawn jobs for tokio::fs::copy
the file; and another job that periodically checks the destiny file's metadata and estimates the progress - this is less precise but more efficient.