Skip to content

Commit 2d80f63

Browse files
committed
io.symlink
1 parent 2b04101 commit 2d80f63

File tree

1 file changed

+15
-0
lines changed
  • docs/Runtime Environment

1 file changed

+15
-0
lines changed

docs/Runtime Environment/IO.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,18 @@ print(io.unique("index", "pluto")) --> index (2).pluto
223223
```pluto
224224
print(io.unique("file_that_doesnt_exist", "pluto")) --> file_that_doesnt_exist.pluto
225225
```
226+
227+
---
228+
### `io.symlink`
229+
Create a symbolic link pointing to a file or directory.
230+
#### Parameters
231+
1. The path that the link will point to.
232+
2. The path where the symlink will be created.
233+
#### Errors
234+
Raises a Lua error if the operation fails.
235+
```pluto
236+
io.symlink("data-v3.json", "data-latest.json")
237+
```
238+
:::caution
239+
This function will fail on Windows when not running as administrator.
240+
:::

0 commit comments

Comments
 (0)