ls.myr 244 B

123456789101112131415161718
  1. use std
  2. use "dispatch"
  3. const ls = {params
  4. var dir, dirname
  5. std.put("ls called\n")
  6. dirname=params[0]
  7. dir = std.try(std.diropen(dirname))
  8. for f : std.byentry(dir)
  9. std.put("{}\n",f)
  10. ;;
  11. }
  12. const __init__ = {
  13. dispatch.register("ls",ls)
  14. }