From 11c560ebccfa3eabb939dafc4139be92edd26842 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 9 Sep 2024 01:14:33 -0400 Subject: More path stuff including some methods --- environment.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'environment.c') 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"}, -- cgit v1.2.3