diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 15:50:28 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-15 15:50:28 -0400 |
| commit | 33876323aa2e3b1994a60b294cfd3f7fd0b35f68 (patch) | |
| tree | d673f2f56cb22ff30cdf4d3a8f05eebebc801047 /environment.c | |
| parent | 4ad7509013bcd383c2060c3659733edb17221fb3 (diff) | |
Update path reading APIs to use optional values instead of erroring
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/environment.c b/environment.c index e0781468..6810f37a 100644 --- a/environment.c +++ b/environment.c @@ -262,7 +262,7 @@ env_t *new_compilation_unit(CORD *libname) {"append", "Path$append", "func(path:Path, text:Text, permissions=0o644[32])"}, {"append_bytes", "Path$append_bytes", "func(path:Path, bytes:[Byte], permissions=0o644[32])"}, {"base_name", "Path$base_name", "func(path:Path)->Text"}, - {"by_line", "Path$by_line", "func(path:Path)->func()->Text?"}, + {"by_line", "Path$by_line", "func(path:Path)->(func()->Text?)?"}, {"children", "Path$children", "func(path:Path, include_hidden=no)->[Path]"}, {"create_directory", "Path$create_directory", "func(path:Path, permissions=0o644[32])"}, {"escape_int", "Int$value_as_text", "func(i:Int)->Path"}, @@ -277,8 +277,8 @@ env_t *new_compilation_unit(CORD *libname) {"is_socket", "Path$is_socket", "func(path:Path, follow_symlinks=yes)->Bool"}, {"is_symlink", "Path$is_symlink", "func(path:Path)->Bool"}, {"parent", "Path$parent", "func(path:Path)->Path"}, - {"read", "Path$read", "func(path:Path)->Text"}, - {"read_bytes", "Path$read_bytes", "func(path:Path)->[Byte]"}, + {"read", "Path$read", "func(path:Path)->Text?"}, + {"read_bytes", "Path$read_bytes", "func(path:Path)->[Byte]?"}, {"relative", "Path$relative", "func(path:Path, relative_to=(./))->Path"}, {"remove", "Path$remove", "func(path:Path, ignore_missing=no)"}, {"resolved", "Path$resolved", "func(path:Path, relative_to=(./))->Path"}, |
