aboutsummaryrefslogtreecommitdiff
path: root/src/environment.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-12-22 16:32:40 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-12-22 16:32:40 -0500
commit83e6cc9197bd8e7a19834d291fe4c5e62639db38 (patch)
treee1fad62f8e579427470e40ead166ea0e90745665 /src/environment.c
parent0ee53cd5a79d41b124413d5da3e4279d06b17bfc (diff)
Add Path.writer() and Path.byte_writer()
Diffstat (limited to 'src/environment.c')
-rw-r--r--src/environment.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/environment.c b/src/environment.c
index cf662749..a82274e7 100644
--- a/src/environment.c
+++ b/src/environment.c
@@ -341,6 +341,10 @@ env_t *global_env(bool source_mapping) {
{"subdirectories", "Path$children", "func(path:Path, include_hidden=no -> [Path])"}, //
{"unique_directory", "Path$unique_directory", "func(path:Path -> Path)"}, //
{"write", "Path$write", "func(path:Path, text:Text, permissions=Int32(0o644) -> Result)"}, //
+ {"writer", "Path$writer",
+ "func(path:Path, append=no, permissions=Int32(0o644) -> func(text:Text, close=no -> Result))"}, //
+ {"byte_writer", "Path$byte_writer",
+ "func(path:Path, append=no, permissions=Int32(0o644) -> func(bytes:[Byte], close=no -> Result))"}, //
{"write_bytes", "Path$write_bytes", "func(path:Path, bytes:[Byte], permissions=Int32(0o644) -> Result)"}, //
{"write_unique", "Path$write_unique", "func(path:Path, text:Text -> Path?)"}, //
{"write_unique_bytes", "Path$write_unique_bytes", "func(path:Path, bytes:[Byte] -> Path?)"}),