I'm using
File.Copy(source, dest);
I need to know when this copy job is done processing so that it can move on to another task.
Is there any callback function I could use in this particular case?
I'm using
File.Copy(source, dest);
I need to know when this copy job is done processing so that it can move on to another task.
Is there any callback function I could use in this particular case?
File.Copy
is not asynchronous. It has completed when the call finishes.
File.Copy is blocking so execution should wait until the operation has complete.
Isn't File.Copy a blocking method? It should wait on that line until the copy of the file is complete then continue execution.
Here is some code to do what you need...cause I'm awesome that way :-)
dim FileCopyDelegate as new Delegate = addressof File.Copy
dim oListOfParams as new List(of string)
oListOfParams.add(source)
oListOfParams.add(destination)
FileCopyDelegate.begininvoke(oListOfParams, addressof CallBackMethod) 'creates an async thread to do the file copy