aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-09 22:18:46 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-09 22:18:46 -0400
commit89234e34e292861fccb8e5bdbefc695a7e443eea (patch)
tree46346917ec96f5ec2c706b58ace5ba0bb38ca887 /docs
parentd356309023fce996a549440aa14e3239f909fe33 (diff)
Document :by_line()paths
Diffstat (limited to 'docs')
-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:**