2017-11-29 23:14:58 +03:00
|
|
|
:: Display directory contents
|
|
|
|
::
|
|
|
|
:::: /hoon/show-dir/lib
|
|
|
|
::
|
|
|
|
/? 310
|
2020-11-25 23:22:55 +03:00
|
|
|
|= {vane=?(%g %c) pax=path des=(map @t ~)}
|
2017-11-29 23:14:58 +03:00
|
|
|
^- tank
|
|
|
|
:+ %rose [" " `~]
|
|
|
|
%+ turn (sort ~(tap by des) aor)
|
2020-11-25 23:22:55 +03:00
|
|
|
|= {kid=@ta ~}
|
2017-11-29 23:14:58 +03:00
|
|
|
=+ paf=`path`/[kid]
|
|
|
|
=- :+ %rose ["/" ~ ?:(dir "/" ~)]
|
2020-11-25 23:22:55 +03:00
|
|
|
(turn paf |=(a=knot leaf+(trip a)))
|
|
|
|
|- ^- {dir=? paf=path}
|
2017-11-29 23:14:58 +03:00
|
|
|
=+ arf=.^(arch (cat 3 vane %y) (weld pax paf))
|
|
|
|
?^ fil.arf
|
|
|
|
[| paf]
|
|
|
|
?~ dir.arf
|
|
|
|
[& paf] :: !!
|
2018-03-19 07:18:20 +03:00
|
|
|
?. ?=({^ ~ ~} dir.arf)
|
2017-11-29 23:14:58 +03:00
|
|
|
[& paf]
|
|
|
|
$(paf (welp paf /[p.n.dir.arf]))
|