aboutsummaryrefslogtreecommitdiff
path: root/docs/paths.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/paths.md')
-rw-r--r--docs/paths.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/paths.md b/docs/paths.md
index f4cdb1f4..a2b7c519 100644
--- a/docs/paths.md
+++ b/docs/paths.md
@@ -88,6 +88,31 @@ The base name of the file or directory.
---
+### `by_line`
+
+**Description:**
+Returns an iterator that can be used to iterate over a file one line at a time.
+
+**Usage:**
+```markdown
+by_line(path: Path) -> func()->NextLine
+```
+
+**Parameters:**
+
+- `path`: The path of the file.
+
+**Returns:**
+An iterator that can be used to get lines from a file one at a time.
+
+**Example:**
+```markdown
+for line in (/dev/stdin):by_line():
+ say(line:upper())
+```
+
+---
+
### `children`
**Description:**