Will data traffic go through the host application program or will be dealt remotely in scenarios where C#'s File.Copy is used:
File.Copy(@"\\SERVER13\LOL\ROFL.txt", @"\\SERVER13\ROFL.txt")
Cheers n thx!
First of all you have a small bug in the path of the destination file.
Second, there are no remote copy operation. There exist a remote move operation (rename, but with a destination in other directory) like MoveFile
(see native API http://msdn.microsoft.com/en-us/library/aa365239%28VS.85%29.aspx).
UPDATED: Probably you came from unix and knows utility rcp, but it works with respect of remote shell service (rshd) and not with respect of direct file system features. You can also use PsExec utility from SysInternals (see http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx) to start some program on the remote computer, but all this is not a subject of programming.
It will go through the local application. The file system does not know what the application is going to do with the bytes it reads from the share, or where the bytes that are written to the share come from.
In addition, the application does not know (in the case of DFS) if the two shares are on the same machine.
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