file.file.remove_line
Declaration
lua
file.remove_line(path, line_number)
Description
Remove line at position. Returns the removed line content.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | Required | — | |
line_number | integer | Required | — | 1-based |
Return Values
| Type | Description |
|---|---|
| boolean | Success |
| string|nil | Removed line content |
Example
lua
local ok, line = file.remove_line("data.txt", 3)