Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File.Copy() function

Tags:

c#

Does anyone know how the function File.Copy() is implemented? I need to know if the file is copied using TCP connection.

Thanks, Haviva.

like image 861
Haviva Avatar asked Dec 28 '22 23:12

Haviva


1 Answers

It uses the native Win32 method CopyFile in kernel32.dll. Files are copied over the normal file system or over SMB (which was correctly pointed out to use TCP by mjmarsh).

Or as Scott Dorman correctly adds it can use the CreateFile method also in kernel32.dll.

like image 141
Orion Adrian Avatar answered Jan 12 '23 06:01

Orion Adrian