I have a couple of questions about the difference between this 2 classes and these specific methods, FileIO.FileSystem.CopyFile() and System.IO.File.Copy()
At the simplest level, they both do the same thing when overloaded with sourceFile, destinationFile and bool set to true to overwrite. EG
FileIO.FileSystem.CopyFile(source, destination, True)
System.IO.File.Copy(source, destination, True)
My two questions are
Use the CopyFile method to copy a file, specifying a source file and the target directory. The overwrite parameter allows you to specify whether or not to overwrite existing files.
Definition. Copies an existing file to a new file.
A quick look at Microsoft.VisualBasic.dll in reflector shows FileIO.FileSystem.Copy
does just hand over to File.Copy
after doing a couple of sanity checks (file, directory exists for example) and creating the destination directory if needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With