MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | int copy_file(string from, string to) |
| 3 | |
| 4 | DESCRIPTION |
| 5 | The efun copy_file() will copy the file <from> to the new name <to>. |
| 6 | If <to> exists and is a directory, then <from> will be placed in that |
| 7 | directory and keep its original name. |
| 8 | |
| 9 | You must have read permission for <from> and write permission for |
| 10 | the target file to copy the file. |
| 11 | |
| 12 | On successful completion copy_file() will return 0. If any |
| 13 | occurs, 1 is returned, or a runtime is generated. |
| 14 | |
| 15 | EXAMPLE |
| 16 | copy_file("/players/wizard/obj.c", "/players/wizard/newobj.c"); |
| 17 | |
| 18 | SEE ALSO |
| 19 | mkdir(E), rmdir(E), rm(E), rename(E) |