diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 02:02:08 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 02:02:08 -0400 |
| commit | 1fbe2cb5dd1aa4b20411ee0c3b00310677373a55 (patch) | |
| tree | 5362da93fdf255fd08b748e9a72b7179a719f4e0 /environment.c | |
| parent | 6752c60f32d0e154e54f30fd2b3e22904e56ea64 (diff) | |
For parsing paths, use nested parens: (./foo), also add some methods
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/environment.c b/environment.c index d7a1ea1a..0f5e1826 100644 --- a/environment.c +++ b/environment.c @@ -254,14 +254,16 @@ env_t *new_compilation_unit(CORD *libname) {"create_directory", "Path$create_directory", "func(path:Path, permissions=0o644_i32)"}, {"escape_text", "Path$escape_text", "func(text:Text)->Path"}, {"exists", "Path$exists", "func(path:Path)->Bool"}, + {"files", "Path$children", "func(path:Path, include_hidden=no)->[Path]"}, {"is_directory", "Path$is_directory", "func(path:Path, follow_symlinks=yes)->Bool"}, {"is_file", "Path$is_file", "func(path:Path, follow_symlinks=yes)->Bool"}, {"is_socket", "Path$is_socket", "func(path:Path, follow_symlinks=yes)->Bool"}, {"is_symlink", "Path$is_symlink", "func(path:Path)->Bool"}, {"read", "Path$read", "func(path:Path)->Text"}, - {"relative", "Path$relative", "func(path:Path, relative_to=./)->Path"}, + {"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"}, + {"resolved", "Path$resolved", "func(path:Path, relative_to=(./))->Path"}, + {"subdirectories", "Path$children", "func(path:Path, include_hidden=no)->[Path]"}, {"write", "Path$write", "func(path:Path, text:Text, permissions=0o644_i32)"}, )}, {"Shell", Type(TextType, .lang="Shell", .env=namespace_env(env, "Shell")), "Shell_t", "Shell$info", TypedArray(ns_entry_t, |
