Android Question recursive folder copy: when finished ?

Add some sleep and wait for and make it all a resumeable sub so you should be able to get the result.
 
Upvote 0
This code is synchronous.

Code: Copy
CopyFolder(...)
Log("This is the next statement)

If it is too slow then you should switch to File.CopyAsync. In that case the sub will be resumable and you will need to call it like this:
Code: Copy
Wait For (CopyFolder(...)) Complete (Success As Boolean)
 
Upvote 0
This code is synchronous.
If so, the whole recursive loop should finish after all copied, correct ?
I found in my app that if to finish activity just after CopyFolder - many files\subforders are not copied yet.
If do not finish - all are OK. I guessed that many recursive calls are in the memory and the finish moment is not known well.
How to understand ?
 
Upvote 0
So, in your recursive code each file copy should finish before next file copying without File.CopyAsync? But ... not finished.
 
Upvote 0
Back
Top