Does File.Copy return only after file is copied?
c#
Solution
Yes, it will wait, as `File.Copy()` is a synchronous method call / file copy operation.
You can download Visual Studio 2013 Express Edition for Windows Desktop for free, to test out this C# code. Download link
Create a new console application project in Visual Studio, and run your code inside the `Main()` method declaration. If you copy a 5-10GB file with your code, you will notice that the call to the `Copy()` method takes some time to return.
Problem
I haven't been able to find an answer to this question, and haven't been sure how to test it. If I have the following two lines; ``` TextWriter tw = new StreamWriter(txtPath,true); File.Copy(OriginalPath, DestinationPath)); tw.WriteLine("blah"); ``` Does the 3rd line wait until the File.Copy is completely done, or could the 3rd line be starting while the File.Copy is still being ran?