docs: fix fs.mkdir example

pull/260/head
sammyette 2023-12-25 22:36:32 -04:00
parent 3219c47071
commit 85e1307e7d
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
3 changed files with 5 additions and 7 deletions

View File

@ -167,9 +167,6 @@ fs.mkdir(name, recursive)
Creates a new directory with the provided `name`.
With `recursive`, mkdir will create parent directories.
-- This will create the directory foo, then create the directory bar in the
-- foo directory. If recursive is false in this case, it will fail.
fs.mkdir('./foo/bar', true)
#### Parameters
`string` **`name`**
@ -180,7 +177,9 @@ Whether to create parent directories for the provided name
#### Example
```lua
-- This will create the directory foo, then create the directory bar in the
-- foo directory. If recursive is false in this case, it will fail.
fs.mkdir('./foo/bar', true)
```
</div>

View File

@ -31,9 +31,7 @@ function fs.join(...path) end
--- Creates a new directory with the provided `name`.
--- With `recursive`, mkdir will create parent directories.
---
--- -- This will create the directory foo, then create the directory bar in the
--- -- foo directory. If recursive is false in this case, it will fail.
--- fs.mkdir('./foo/bar', true)
---
function fs.mkdir(name, recursive) end
--- Returns a list of all files and directories in the provided path.

View File

@ -198,6 +198,7 @@ func fjoin(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
-- This will create the directory foo, then create the directory bar in the
-- foo directory. If recursive is false in this case, it will fail.
fs.mkdir('./foo/bar', true)
#example
*/
func fmkdir(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
if err := c.CheckNArgs(2); err != nil {