diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-05 01:07:09 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-05 01:07:09 -0400 |
| commit | 316eff8b4f6c4f0c119360dfbb94aa0840a7e65a (patch) | |
| tree | 06d2ba0a53874b1b34bf495ce1010ed60547054c /docs/paths.md | |
| parent | 355ad9532163f9513c01aa59333aed5363386022 (diff) | |
Fix up more things
Diffstat (limited to 'docs/paths.md')
| -rw-r--r-- | docs/paths.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/paths.md b/docs/paths.md index 2bfc9b0f..ac60d864 100644 --- a/docs/paths.md +++ b/docs/paths.md @@ -64,7 +64,7 @@ intended. Paths can be created from text with slashes using - [`func owner(path: Path, follow_symlinks=yes -> Text?)`](#owner) - [`func parent(path: Path -> Path)`](#parent) - [`func read(path: Path -> Text?)`](#read) -- [`func read_bytes(path: Path -> [Byte]?)`](#read_bytes) +- [`func read_bytes(path: Path, limit: Int? = none -> [Byte]?)`](#read_bytes) - [`func relative_to(path: Path, relative_to=(./) -> Path)`](#relative_to) - [`func remove(path: Path, ignore_missing=no -> Void)`](#remove) - [`func resolved(path: Path, relative_to=(./) -> Path)`](#resolved) @@ -726,10 +726,11 @@ Reads the contents of the file at the specified path or a null value if the file could not be read. ```tomo -func read_bytes(path: Path -> [Byte]?) +func read_bytes(path: Path, limit: Int? = none -> [Byte]?) ``` - `path`: The path of the file to read. +- `limit`: A limit to how many bytes should be read. **Returns:** The byte contents of the file. If the file cannot be read, a null value will be |
