Skip to content

Commit f8a3b9c

Browse files
committed
Fix io.copy
1 parent 9f73622 commit f8a3b9c

File tree

1 file changed

+3
-9
lines changed
  • docs/Runtime Environment

1 file changed

+3
-9
lines changed

docs/Runtime Environment/IO.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@ Copy a file to another file, creating a new file if needed.
1414
#### Parameters
1515
1. A string path or file stream.
1616
2. A path towards the file to copy into.
17-
#### Returns
18-
A boolean indicating if the file was successfully copied.
19-
```pluto
20-
if io.copy("./cfg/config.txt", "./backup_cfg/config.txt") then
21-
print("Successfully created a backup config!")
22-
else
23-
print("Failed to create a backup config.")
24-
end
25-
```
17+
#### Errors
18+
Raises a Lua error if the copy operation fails.
19+
2620
---
2721
### `io.part`
2822
Extracts the parts of a path.

0 commit comments

Comments
 (0)