Skip to content

Commit 2cbe2a7

Browse files
committed
Document that io.isdir & io.isfile may throw
1 parent 7de35a9 commit 2cbe2a7

File tree

1 file changed

+4
-0
lines changed
  • docs/Runtime Environment

1 file changed

+4
-0
lines changed

docs/Runtime Environment/IO.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ print(io.part("/path/to/foo.txt", "name")) -- "foo.txt"
3838
1. A string path or file stream.
3939
#### Returns
4040
A boolean indicating if the path led toward a directory.
41+
#### Errors
42+
Raises a Lua error if the given path didn't lead to anything.
4143
```pluto
4244
local path = "./dir/main/"
4345
local bool = io.isdir(path)
@@ -53,6 +55,8 @@ end
5355
1. A string path or file stream.
5456
#### Returns
5557
A boolean indicating if the path led towards a file.
58+
#### Errors
59+
Raises a Lua error if the given path didn't lead to anything.
5660
```pluto
5761
local path = "./isfile/file"
5862
local bool = io.isfile(path)

0 commit comments

Comments
 (0)