Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
531 changes: 515 additions & 16 deletions docs/src/modules/fs.md

Large diffs are not rendered by default.

25 changes: 24 additions & 1 deletion docs/src/modules/is.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ is("hello", "STRING") --> true

| Function | Description |
| ------------------------- | ------------------------------------------------------------ |
| [`path(v)`](#fn-path) | Returns `true` when `v` is a valid filesystem path. |
| [`block(v)`](#fn-block) | Returns `true` when `v` is a block device path. |
| [`char(v)`](#fn-char) | Returns `true` when `v` is a character device path. |
| [`device(v)`](#fn-device) | Returns `true` when `v` is a block or character device path. |
Expand Down Expand Up @@ -368,7 +369,29 @@ Filesystem path type checks.
>
> Path checks require **LuaFileSystem**
> ([`lfs`](https://github.com/lunarmodules/luafilesystem)) and raise an error if
> it is not installed. <a id="fn-block"></a>
> it is not installed. <a id="fn-path"></a>

#### `path(v)`

Returns `true` when `v` is a valid filesystem path.

**Parameters**:

- `v` (`any`): Value to validate.

**Return**:

- `isPath` (`boolean`): Whether the check succeeds.

**Example**:

```lua
is.path("README.md")
```

> [!NOTE] Returns `true` for broken symlinks.

<a id="fn-block"></a>

#### `block(v)`

Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/keyword.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
description: "Lua keyword helpers."
description: "Helpers for Lua keywords and identifiers."
---

# `keyword`

Lua keyword helpers.
Helpers for Lua keywords and identifiers.

## Usage

Expand Down
Loading