diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 01:14:33 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 01:14:33 -0400 |
| commit | 11c560ebccfa3eabb939dafc4139be92edd26842 (patch) | |
| tree | 43af12019ce7d133a539a0b3a9388e07e82acec6 /environment.c | |
| parent | 13a9304decb86450a2a0e9cc756da4c2d373c929 (diff) | |
More path stuff including some methods
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/environment.c b/environment.c index d7f6c6f7..03d713f3 100644 --- a/environment.c +++ b/environment.c @@ -249,9 +249,19 @@ env_t *new_compilation_unit(CORD *libname) {"escape_text", "Pattern$escape_text", "func(text:Text)->Pattern"}, )}, {"Path", Type(TextType, .lang="Path", .env=namespace_env(env, "Path")), "Text_t", "Text$info", TypedArray(ns_entry_t, + {"append", "Path$append", "func(path:Path, text:Text, permissions=0o644_i32)"}, + {"create_directory", "Path$create_directory", "func(path:Path, permissions=0o644_i32)"}, {"escape_text", "Path$escape_text", "func(text:Text)->Path"}, - {"resolved", "Path$resolved", "func(path:Path, relative_to=./)->Path"}, + {"exists", "Path$exists", "func(path:Path)->Bool"}, + {"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"}, + {"remove", "Path$remove", "func(path:Path, ignore_missing=no)"}, + {"resolved", "Path$resolved", "func(path:Path, relative_to=./)->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, {"escape_text", "Shell$escape_text", "func(text:Text)->Shell"}, |
