Reputation: 7959
There are several ways to copy azure blob storage blocks around. There's a synchronous and asynchronous version of StartCopy
. There is also a BeginStartCopy
which also has the completion callback.
The BeginStartCopy
approach explicitly states that the callback is executed when the copy has completed.
The StartCopy
approaches both state that they return a string, which is a copy process id - they don't state that they return when the copy has completed.
Do those StartCopy
methods return after the actual copy has completed?
Upvotes: 8
Views: 5388
Reputation: 6467
Both StartCopy()
and await StartCopyAsync()
return when the copy is started on Azure Blob Storage service. The completion callback of BeginStartCopy()
is also executed when the copy is started on Azure Blob Storage service.
In conclusion, StartCopy
(including all 3 versions above) is an asynchronous API, you need to call FetchAttributes()
periodically by yourself to get the latest copy progress.
Here is an answer that you can refer to: https://stackoverflow.com/a/47651946/2995449
Upvotes: 13