cleanup, docs

This commit is contained in:
root
2026-06-16 23:02:45 +00:00
parent ea08d5f28b
commit b8b56cf3dd
160 changed files with 1076 additions and 511 deletions
+14 -10
View File
@@ -2,16 +2,20 @@
StringList ls(String path)
:params
path : a filesystem path
return value : list of directory entries
path : directory to list
return value : a StringList of entry names
:content
Returns the names of the entries in a directory as a `StringList`. For names only this is simpler than `dir_list()`, which returns full metadata per entry.
:example
mkdir("/tmp/doc-ls");
file_put_contents("/tmp/doc-ls/one.txt", "1");
file_put_contents("/tmp/doc-ls/two.txt", "2");
print(join(ls("/tmp/doc-ls").sort(), ","), "\n");
dir_remove("/tmp/doc-ls", true);
:see
>sys
:content
Returns a list of files and subdirectories within `path`.
This is a simple directory listing helper for filesystem-oriented tasks.
:example
print("ls example\n");
dir_list
0_StringList