[go: nahoru, domu]

File copying: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 4:
All [[operating system]]s include file copying in the user interface, like "cp" in [[Unix]] and "copy" in [[MS-DOS]]; operating systems with [[GUI]]s usually provide [[copy-and-paste]] or [[drag-and-drop]] methods of file copying.  [[File manager]]s, too, provide an easy way of copying files.
 
Internally, however, whdanielailewhile some systems have specialized [[Application programming interface|API]]s for copying files (like CopyFile and CopyFileEx in [[Windows API]]), others (like [[Unix]] and [[MS-DOS]]) fall back to simply reading the contents of the old file and writing it to the new file. This makes little difference with local files, but provides an interesting situation when both the source and target files are located on a remote [[file server]].  Operating systems with specialized file copying APIs are usually able to tell the server to perform the copying locally, without sending file contents over the network, thus greatly improving performance.  Those systems that have no comparable APIs, however, have to read the file contents over the network, and then to send them back, again over the network.  Sometimes remote file copying is performed with a specialized command, like "ncopy" in MS-DOS clients for [[Novell NetWare]].
 
An even more complicated situation arises when one needs to copy files between two remote servers.  The simple way is to read data from one server, and then to write them to the second server.  The tricky way is to tell both servers to exchange data directly (and this is hardly implemented anywhere).