ls
lib callCapy
function ls(path : string) any
Description
ls() returns the names in a directory. It returns an empty list when it cannot list the directory.
Parameters
path : directory path to list
Return Values
An any list of entry names.
Example
Capy
var root := file_temp() file_unlink(root) mkdir(root) file_put_contents(path_join(root, "one.txt"), "1") print(join(sort(ls(root)), ","), "\n") dir_remove(root, true)
Output
one.txt