fs.copy
Copies the file at the path path to the path dest. If dest is a directory, the function will copy the file into that directory with its original name.
|
|||
Copies the edit program (/rom/programs/edit.lua ) to the root directory (/ ). |
|||
Code | <nowiki>
fs.copy("/rom/programs/edit.lua", "/")
</nowiki>
|
||
Output | A copy of the edit program will now be located at /edit.lua . |
|
|||
Copies the clear program (/rom/programs/clear.lua ) to /cls.lua . |
|||
Code | <nowiki>
fs.copy("/rom/programs/clear.lua", "/cls.lua")
</nowiki>
|
||
Output | A copy of the clear program will now be located at /cls.lua |
fs.copy Function | |
---|---|
Syntax fs.copy(
| |
Returns | nil |
API | fs |
Source | CC:Tweaked (source) |
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.